HighGHSA-gq28-h5vg-8prxCVE-2021-22112

Privilege escalation in spring security

Published 10 May 2021 · Updated 15 Mar 2024

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

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 packages

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

Details

Spring Security 5.4.x prior to 5.4.4, 5.3.x prior to 5.3.8.RELEASE, 5.2.x prior to 5.2.9.RELEASE, and older unsupported versions can fail to save the SecurityContext if it is changed more than once in a single request.A malicious user cannot cause the bug to happen (it must be programmed in). However, if the application's intent is to only allow the user to run with elevated privileges in a small portion of the application, the bug can be leveraged to extend those privileges to the rest of the application.

Is GHSA-gq28-h5vg-8prx 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-bom, and gives you the command that fixes it.

References

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