Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates
Published 10 Jun 2026 · Updated 10 Sept 2026
Is your project on an affected org.springframework.security:spring-security-web?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=6.5.0 <6.5.11
- Fixed in
- 6.5.11
mvn versions:use-dep-version -Dincludes=org.springframework.security:spring-security-web -DdepVersion=6.5.11 -DforceVersion=true- Affected
- >=6.4.0 <=6.4.13
- Fixed in
- No fix released
- Affected
- >=6.0.0 <=6.3.10
- Fixed in
- No fix released
- Affected
- >=5.8.0 <=5.8.16
- Fixed in
- No fix released
- Affected
- <=5.7.14
- Fixed in
- No fix released
Details
In Spring Security Web, SubjectDnX509PrincipalExtractor 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.
SubjectDnX509PrincipalExtractor is deprecated by this CVE and replaced with SubjectX500PrincipalExtractor. As part of updating, you should also migrate to SubjectX500PrincipalExtractor.
Affected versions: Spring Security Enterprise 5.7.0 through 5.7.24; 5.8.0 through 5.8.26; 6.3.0 through 6.3.17; 6.4.0 through 6.4.17; 6.5.0 through 6.5.10. OSS 6.5.0 through 6.5.10.
Is GHSA-293q-567p-wmwq in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.springframework.security:spring-security-web, and gives you the command that fixes it.
More advisories for org.springframework.security:spring-security-web
- MediumCVE-2026-41706Spring Security: Open Redirect via Unvalidated Post-Login Redirect URL Stored in CookieRequestCache · 10 Jun 2026
- MediumCVE-2026-22747Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates · 22 Apr 2026
- CriticalCVE-2026-22732Spring Security HTTP Headers Are not Written Under Some Conditions · 20 Mar 2026
- CriticalCVE-2024-38821Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications · 28 Oct 2024
- CriticalCVE-2022-22978Authorization bypass in Spring Security · 20 May 2022
- HighCVE-2021-22112Privilege escalation in spring security · 10 May 2021
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.