CVE-2023-34035 Spring Security's authorization rules can be misconfigured when using multiple servlets
Attackers can bypass authorization rules in Spring Security applications using multiple servlets and specific request matcher configurations.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-34035?
CVE-2023-34035 is a high-severity missing authorization vulnerability in Spring Security, published on 18 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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
Weakness: CWE-863
Which versions are affected by CVE-2023-34035?
6 open source packages ship an affected version, including org.springframework.security:spring-security-config. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.springframework.security:spring-security-config Maven | From 5.8.0 | 5.8.5 |
org.springframework.security:spring-security-config Maven | From 5.8.0 | 5.8.5 |
org.springframework.security:spring-security-config Maven | From 6.0.0 | 6.0.5 |
org.springframework.security:spring-security-config Maven | From 6.0.0 | 6.0.5 |
org.springframework.security:spring-security-config Maven | From 6.1.0 | 6.1.2 |
org.springframework.security:spring-security-config Maven | From 6.1.0 | 6.1.2 |
Products include Vmware Spring Security.
How do I fix CVE-2023-34035?
Upgrade org.springframework.security:spring-security-config to a fixed version for your release line: 5.8.5, 6.0.5 or 6.1.2.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2023-34035 being exploited?
There is no known exploitation of CVE-2023-34035 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in Spring Security
- CVE-2014-3527 Authorization Bypass in Spring Security
- CVE-2026-59354 Spring Security OAuth2 Authorization Server: Insufficient validation of Dynamic Client Registration metadata
- CVE-2026-59270 Spring Security embedded UnboundID LDAP server exposes well-known administrative bind DN on all network interfaces
- CVE-2026-22732 Under Some Conditions Spring Security HTTP Headers Are not Written
- CVE-2023-34034 Access Control Bypass in Spring Security
Sources
Also known as GHSA-4vpr-xfrp-cj64.