# CVE-2020-5397: CSRF Attack via CORS Preflight Requests with Spring MVC or Spring WebFlux

> Attackers can bypass CSRF protections on non-authenticated Spring MVC or WebFlux endpoints using CORS preflight requests in Chrome with client certificates.

- **Severity:** Medium 5.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jan 2020
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-7pm4-g2qj-j85x, UBUNTU-CVE-2020-5397

## What is CVE-2020-5397?

CVE-2020-5397 is a medium-severity vulnerability in Oracle Application Testing Suite, published on 17 Jan 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Spring Framework, versions 5.2.x prior to 5.2.3 are vulnerable to CSRF attacks through CORS preflight requests that target Spring MVC (spring-webmvc module) or Spring WebFlux (spring-webflux module) endpoints. Only non-authenticated endpoints are vulnerable because preflight requests should not include credentials and therefore requests should fail authentication. However a notable exception to this are Chrome based browsers when using client certificates for authentication since Chrome sends TLS client certificates in CORS preflight requests in violation of spec requirements. No HTTP body can be sent or received as a result of this attack.

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2020-5397?

4 open source packages ship an affected version, including org.springframework:spring-webflux and org.springframework:spring-webmvc. It affects 27 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework:spring-webflux` | Maven | From 5.2.0 | 5.2.3 |
| `org.springframework:spring-webflux` | Maven | From 5.2.0 | 5.2.3 |
| `org.springframework:spring-webmvc` | Maven | From 5.2.0 | 5.2.3 |
| `org.springframework:spring-webmvc` | Maven | From 5.2.0 | 5.2.3 |

Products: Oracle Application Testing Suite, Oracle Communications Brm - Elastic Charging Engine, Oracle Communications Diameter Signaling Router, Oracle Communications Element Manager, Oracle Communications Policy Management, Oracle Communications Session Route Manager, Oracle Enterprise Manager Base Platform, Oracle Financial Services Regulatory Reporting With Agilereporter, Oracle Flexcube Private Banking, Oracle Healthcare Master Person Index, Oracle Insurance Calculation Engine, Oracle Insurance Policy Administration J2ee, Oracle Insurance Rules Palette, Oracle Mysql Enterprise Monitor, Oracle Rapid Planning, Oracle Retail Assortment Planning, Oracle Retail Back Office, Oracle Retail Central Office, Oracle Retail Financial Integration, Oracle Retail Integration Bus and 7 more.

## How do I fix CVE-2020-5397?

Upgrade org.springframework:spring-webflux to 5.2.3 or later.

## Is CVE-2020-5397 being exploited?

There is no known exploitation of CVE-2020-5397 in the wild and no public exploit code.

## Other vulnerabilities in Oracle Application Testing Suite

- [CVE-2026-35290](https://insights.sbomify.com/CVE-2026-35290/): Auth bypass in Oracle Application Testing Suite (critical 9.8)
- [CVE-2026-46876](https://insights.sbomify.com/CVE-2026-46876/): Auth bypass in Oracle Application Testing Suite (critical 9.8)
- [CVE-2026-46924](https://insights.sbomify.com/CVE-2026-46924/): Auth bypass in Oracle Application Testing Suite (critical 9.8)
- [CVE-2019-2904](https://insights.sbomify.com/CVE-2019-2904/): Auth bypass in Enterprise Repository (critical 9.8)
- [CVE-2018-1275](https://insights.sbomify.com/CVE-2018-1275/): Spring Framework has Improperly Implemented Security Check for Standard (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-5397 and fix it if it is affected.

What it is: CVE-2020-5397 is a medium-severity vulnerability in Oracle Application Testing Suite, published on 17 Jan 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-5397 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework:spring-webflux (Maven): affected from 5.2.0; fixed in 5.2.3
- org.springframework:spring-webflux (Maven): affected from 5.2.0; fixed in 5.2.3
- org.springframework:spring-webmvc (Maven): affected from 5.2.0; fixed in 5.2.3
- org.springframework:spring-webmvc (Maven): affected from 5.2.0; fixed in 5.2.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-5397/ (Markdown: https://insights.sbomify.com/CVE-2020-5397/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-5397
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-5397
- OSV: https://osv.dev/vulnerability/CVE-2020-5397

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-5397/
Summaries are generated and may contain mistakes; the official description above is the record.
