Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates
Vulnerability in Spring Spring Security. SubjectX500PrincipalExtractor does not correctly handle certain malformed X.509 certificate CN values, which can lead to reading the wrong value for the username. In a carefully crafted certificate, this can lead to an attacker impersonating another user. This issue affects Spring Security: from 7.0.0 through 7.0.4.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.springframework.security:spring-security-web | >= 7.0.0, < 7.0.5 | 7.0.5 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N- Weakness (CWE)
CWE-297- Platform
- Java / Kotlin (Maven)
- Package
org.springframework.security:spring-security-web- Disclosed
- 22.04.2026
- Updated
- 11.10.2026 13:20
Sources and licenses
OSV / GitHub Advisory Database - GHSA-2jrg-rf5x-568g - CC BY 4.0
Vulnerability history: org.springframework.security:spring-security-web
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 7
- First → latest
- 05.2021 06.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
- High 1
- Medium 3
Disclosures per year
- 2021: 1
- 2022: 1
- 2023: 0
- 2024: 1
- 2025: 0
- 2026: 4
-
Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.