# CVE-2023-20860: Spring Framework is vulnerable to security bypass via mvcRequestMatcher pattern mismatch

> Attackers can bypass Spring Security authorization checks due to pattern matching mismatches when using specific wildcard configurations.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/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:** 27 Mar 2023
- **Updated:** 19 Feb 2025
- **Also known as:** DEBIAN-CVE-2023-20860, GHSA-7phw-cxx7-q9vq, RHLW-2026-6b59708c7adb9eb8, ROOT-APP-MAVEN-CVE-2023-20860, UBUNTU-CVE-2023-20860

## What is CVE-2023-20860?

CVE-2023-20860 is a high-severity vulnerability in Vmware Spring Framework, published on 27 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Spring Framework running version 6.0.0 - 6.0.6 or 5.3.0 - 5.3.25 using "**" as a pattern in Spring Security configuration with the mvcRequestMatcher creates a mismatch in pattern matching between Spring Security and Spring MVC, and the potential for a security bypass.

## Which versions are affected by CVE-2023-20860?

8 open source packages ship an affected version, including org.springframework:spring and org.springframework:spring-webmvc. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework:spring` | Maven | From 5.3.0 | 5.3.26 |
| `org.springframework:spring` | Maven | From 5.3.0 | 5.3.26 |
| `org.springframework:spring` | Maven | From 6.0.0 | 6.0.7 |
| `org.springframework:spring` | Maven | From 6.0.0 | 6.0.7 |
| `org.springframework:spring-webmvc` | Maven | From 5.3.0 | 5.3.26 |
| `org.springframework:spring-webmvc` | Maven | From 5.3.0 | 5.3.26 |
| `org.springframework:spring-webmvc` | Maven | From 6.0.0 | 6.0.7 |
| `org.springframework:spring-webmvc` | Maven | From 6.0.0 | 6.0.7 |

Products: Vmware Spring Framework.

## How do I fix CVE-2023-20860?

Upgrade org.springframework:spring to a fixed version for your release line: 5.3.26 or 6.0.7.

## Is CVE-2023-20860 being exploited?

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

Public exploit code:

- https://github.com/limo520/CVE-2023-20860 (github_poc): https://github.com/limo520/CVE-2023-20860

## Other vulnerabilities in Vmware Spring Framework

- [CVE-2026-47884](https://insights.sbomify.com/CVE-2026-47884/): Spring Framework Improper Path Limitation in XsltView (critical 9.8)
- [CVE-2026-47890](https://insights.sbomify.com/CVE-2026-47890/): Spring Framework Server Sent Event stream corruption while rendering fragments (critical 9.8)
- [CVE-2026-47891](https://insights.sbomify.com/CVE-2026-47891/): Spring Framework maxInMemorySize Bypassed in Jaxb2Decoder (critical 9.8)
- [CVE-2026-47892](https://insights.sbomify.com/CVE-2026-47892/): Spring Framework Header Predicate Bypass in WebFlux Functional Endpoints (critical 9.8)
- [CVE-2026-59313](https://insights.sbomify.com/CVE-2026-59313/): Server Sent Event stream corruption in Spring MVC functional web framework (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-20860 and fix it if it is affected.

What it is: CVE-2023-20860 is a high-severity vulnerability in Vmware Spring Framework, published on 27 Mar 2023. 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-2023-20860 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework:spring (Maven): affected from 5.3.0; fixed in 5.3.26
- org.springframework:spring (Maven): affected from 5.3.0; fixed in 5.3.26
- org.springframework:spring (Maven): affected from 6.0.0; fixed in 6.0.7
- org.springframework:spring (Maven): affected from 6.0.0; fixed in 6.0.7
- org.springframework:spring-webmvc (Maven): affected from 5.3.0; fixed in 5.3.26
- org.springframework:spring-webmvc (Maven): affected from 5.3.0; fixed in 5.3.26
- org.springframework:spring-webmvc (Maven): affected from 6.0.0; fixed in 6.0.7
- org.springframework:spring-webmvc (Maven): affected from 6.0.0; fixed in 6.0.7

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-2023-20860/ (Markdown: https://insights.sbomify.com/CVE-2023-20860/index.md)
```

## Sources

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

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