MediumGHSA-2jrg-rf5x-568gCVE-2026-22747

Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates

Published 22 Apr 2026 · Updated 10 Sept 2026

Is your project on an affected org.springframework.security:spring-security-web?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
>=7.0.0 <7.0.5
Fixed in
7.0.5
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=org.springframework.security:spring-security-web -DdepVersion=7.0.5 -DforceVersion=true

Details

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.

Is GHSA-2jrg-rf5x-568g 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-47838Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates · 10 Jun 2026
  • MediumCVE-2026-41706Spring Security: Open Redirect via Unvalidated Post-Login Redirect URL Stored in CookieRequestCache · 10 Jun 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
org.springframework.security:spring-security-web security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.