Spring Security: Open Redirect via Unvalidated Post-Login Redirect URL Stored in CookieRequestCache
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
- >=7.0.0 <7.0.6
- Fixed in
- 7.0.6
mvn versions:use-dep-version -Dincludes=org.springframework.security:spring-security-web -DdepVersion=7.0.6 -DforceVersion=true- 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.3.0 <=6.3.16
- Fixed in
- No fix released
- Affected
- >=5.8.0 <=5.8.25
- Fixed in
- No fix released
- Affected
- <=5.7.23
- Fixed in
- No fix released
Details
Spring Security's CookieRequestCache and CookieServerRequestCache store the pre-authentication request URL in a browser cookie so that users can be redirected back to their intended destination after a successful login. In affected versions, the full absolute URL is stored in the cookie and is used without validation as the post-login redirect target.
Affected versions: Spring Security 5.7.0 through 5.7.23; 5.8.0 through 5.8.25; 6.3.0 through 6.3.16; 6.4.0 through 6.4.16; 6.5.0 through 6.5.10; 7.0.0 through 7.0.5.
Is GHSA-x2r2-rvhq-2mqv 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-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.