HIGH 8.8

CVE-2021-22112

Privilege escalation in spring security

Description

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.

Affected Maven artifacts (2)

ArtifactAffected versionsFixed in
org.springframework.security » spring-security-bom
< 5.2.9>= 5.3.0, < 5.3.8>= 5.4.0, < 5.4.4
5.2.9, 5.3.8, 5.4.4
org.springframework.security » spring-security-web
< 5.2.9>= 5.3.0, < 5.3.8>= 5.4.0, < 5.4.4
5.2.9, 5.3.8, 5.4.4

Blast radius

2affected artifacts
304affected versions
10,046dependent artifacts (est.)
388,868dependent versions

56% of the dependent artifacts (5,682) still pull an affected version in their latest release.

DepthDependent versions
Direct
47,995
2 hops
145,945
3 hops
102,848
4 hops
57,716
5 hops
21,831
6 hops
12,533

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

References