CVE-2026-47838
Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates
Description
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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.security » spring-security-web | <= 5.7.14>= 5.8.0, <= 5.8.16>= 6.0.0, <= 6.3.10>= 6.4.0, <= 6.4.13>= 6.5.0, < 6.5.11 | 6.5.11 |
Blast radius
68% of the dependent artifacts (10,296) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 83,555 |
| 2 hops | 467,024 |
| 3 hops | 262,307 |
| 4 hops | 87,284 |
| 5 hops | 28,481 |
| 6 hops | 13,740 |
Most used dependents
- org.springframework.boot » spring-boot-starter-security3,606 usages
- org.apache.spark » spark-sql3,174 usages
- org.apache.spark » spark-core2,899 usages
- org.springframework.security » spring-security-config2,063 usages
- org.springframework.security » spring-security-test1,308 usages
- org.jenkins-ci.main » jenkins-core1,191 usages
- org.apache.hbase » hbase-client960 usages
- org.apache.spark » spark-mllib831 usages
- org.apache.hive » hive-exec699 usages
- org.apache.hbase » hbase-common674 usages
- org.apache.spark » spark-streaming670 usages
- org.apache.hbase » hbase-server643 usages
- org.apache.spark » spark-hive633 usages
- org.springframework.security.oauth » spring-security-oauth2554 usages
- com.atlassian.jira » jira-core554 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
