Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates
Moderate severity
GitHub Reviewed
Published
Apr 22, 2026
to the GitHub Advisory Database
•
Updated Apr 29, 2026
Package
Affected versions
>= 7.0.0, <= 7.0.4
Patched versions
7.0.5
Description
Published by the National Vulnerability Database
Apr 22, 2026
Published to the GitHub Advisory Database
Apr 22, 2026
Reviewed
Apr 29, 2026
Last updated
Apr 29, 2026
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.
References