Unauthorized User Impersonation when Using X.509 Client Certificates
Spring Security
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.springframework.security:spring-security-web Maven |
|
|
Spring Security
| Product | Affected | Fixed in |
|---|---|---|
| org.springframework.security:spring-security-web Maven |
|
|
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.
Affected versions: Spring Security 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.
From the CVE record · vmware
SubjectDnX509PrincipalExtractor can read the wrong username from certain malformed X.509 certificate CN values. An attacker presenting a carefully crafted certificate may be able to impersonate another user when this extractor is used for authentication.
Teams using Spring Security spring-security-web should check the affected version ranges in the advisory, as the supplied package and product ranges differ.