# CVE-2023-34035: Spring Security's authorization rules can be misconfigured when using multiple servlets

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.3
- **CVSS:** 7.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.64% (percentile 45, 2026-11-26)
- **CWE:** CWE-863
- **Aliases:** GHSA-4vpr-xfrp-cj64
- **Published:** 2023-07-18T15:29:10.091Z
- **Modified:** 2026-06-17T06:02:46.143Z

## Who should check

- Projects that depend on Maven package org.springframework.security:spring-security-config (\>= 5.8.0, \< 5.8.5)
- Anyone running Spring Security Spring Security 5.8.0 to 5.8.4, Spring Security 6.0.0 to 6.0.4, Spring Security 6.1.0 to 6.1.1

## Description

Spring Security versions 5.8 prior to 5.8.5, 6.0 prior to 6.0.5, and 6.1 prior to 6.1.2 could be susceptible to authorization rule misconfiguration if the application uses requestMatchers(String) and multiple servlets, one of them being Spring MVC’s DispatcherServlet. (DispatcherServlet is a Spring MVC component that maps HTTP endpoints to methods on @Controller-annotated classes.)

Specifically, an application is vulnerable when all of the following are true:

  \*  Spring MVC is on the classpath
  \*  Spring Security is securing more than one servlet in a single application (one of them being Spring MVC’s DispatcherServlet)
  \*  The application uses requestMatchers(String) to refer to endpoints that are not Spring MVC endpoints


An application is not vulnerable if any of the following is true:

  \*  The application does not have Spring MVC on the classpath
  \*  The application secures no servlets other than Spring MVC’s DispatcherServlet
  \*  The application uses requestMatchers(String) only for Spring MVC endpoints

## Affected and fixed versions

- Maven `org.springframework.security:spring-security-config`: affected \>= 5.8.0, \< 5.8.5; fixed 5.8.5, 6.0.5, 6.1.2 (osv)
- Spring Security: Spring Security 5.8.0 to 5.8.4, Spring Security 6.0.0 to 6.0.4, Spring Security 6.1.0 to 6.1.1 (cvelist)

## Mitigation

- Upgrade org.springframework.security:spring-security-config to one of 5.8.5, 6.0.5, 6.1.2 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-34035. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-34035.md
Affected: org.springframework.security:spring-security-config >= 5.8.0, < 5.8.5
Fixed in: 5.8.5, 6.0.5, 6.1.2

Steps:
1. Search this machine and project for org.springframework.security:spring-security-config (Maven), Spring Security: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-34035 being exploited?

There is no confirmed exploitation: CVE-2023-34035 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.64% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-34035?

High: CVSS 7.3 (v3.1, scored by CNA). Remote, no login needed.

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

org.springframework.security:spring-security-config \>= 5.8.0, \< 5.8.5.

### Is there a fix for CVE-2023-34035?

Yes. Fixed in 5.8.5, 6.0.5, 6.1.2. Upgrade org.springframework.security:spring-security-config to one of 5.8.5, 6.0.5, 6.1.2 (or later in the same release line).

### How do I check if I'm affected by CVE-2023-34035?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-34035>
- patch: <https://github.com/spring-projects/spring-security-samples/commit/4e3bec904a5467db28ea33e25ac9d90524b53d66>
- patch: <https://github.com/spring-projects/spring-security/commit/bb46a5427005e33e637b15948de8adae244ce547>
- patch: <https://github.com/spring-projects/spring-security/commit/df239b6448ccf138b0c95b5575a88f33ac35cd9a>
- exploit: <https://spring.io/security/cve-2023-34035>
- other: <https://github.com/spring-projects/spring-security-samples/tree/main/servlet/java-configuration/authentication/preauth>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-34035>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-4vpr-xfrp-cj64> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-34035> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-34035>
