CVE-2021-22112
Privilege escalation in spring security
Reported by vmware · Published February 23, 2021
spring-security-bom is fixed in 5.4.4, 5.3.9 and 5.2.9 (Maven Central)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| org.springframework.security:spring-security-bom | Maven Central | 5.4.4, 5.3.9, 5.2.9 |
| org.springframework.security:spring-security-core | Maven Central | 5.4.4, 5.3.9, 5.2.9 |
| org.springframework.security:spring-security-web | Maven Central | 5.4.4, 5.3.8, 5.2.9 |
| jenkins | Arch Linux | 2.280-1 |
| spring_security | vmware | 5.4.4 |
| spring_security | pivotal_software | 5.3.8, 5.2.9 |
| communications_element_manager | oracle | 8.2.4.0 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | 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 |
| n/a | 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 |
Timeline
- Feb 23, 2021 CVE Published
- Feb 23, 2021 PoC Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Nov 21, 2024 CVE Updated
- Mar 20, 2026 Security Advisory (5 in total, the first dated here)
- Mar 20, 2026 Distribution Patch (3 in total, the first dated here)
- Aug 25, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-22112
vulnetix vdb fixes CVE-2021-22112
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-22112/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [oss-security] 20210219 Vulnerability in Jenkins mailing-listx_refsource_MLIST
- [nifi-issues] 20210510 [GitHub] [nifi] exceptionfactory opened a new pull request #5066: NIFI-8502 Upgrade Spring Framework to 5.3.6 mailing-listx_refsource_MLIST
- x_refsource_MISC
- x_refsource_MISC
- [portals-pluto-dev] 20210623 [jira] [Closed] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.0 due to CVE-2021-22112 mailing-listx_refsource_MLIST
- [portals-pluto-dev] 20210623 [jira] [Updated] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.0 due to CVE-2021-22112 mailing-listx_refsource_MLIST
- [portals-pluto-scm] 20210623 [portals-pluto] branch master updated: PLUTO-786 Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.0 due to CVE-2021-22112 mailing-listx_refsource_MLIST
- [portals-pluto-dev] 20210714 [jira] [Updated] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.1 due to CVE-2021-22112 and CVE-2021-22119 mailing-listx_refsource_MLIST
- [portals-pluto-dev] 20210714 [jira] [Reopened] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.1 due to CVE-2021-22112 and CVE-2021-22119 mailing-listx_refsource_MLIST
- [portals-pluto-dev] 20210714 [jira] [Closed] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.1 due to CVE-2021-22112 and CVE-2021-22119 mailing-listx_refsource_MLIST
- [portals-pluto-dev] 20210714 [jira] [Reopened] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.0 due to CVE-2021-22112 mailing-listx_refsource_MLIST
- [portals-pluto-dev] 20210714 [jira] [Comment Edited] (PLUTO-786) Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.1 due to CVE-2021-22112 and CVE-2021-22119 mailing-listx_refsource_MLIST
- [portals-pluto-scm] 20210714 [portals-pluto] branch master updated: PLUTO-786 Upgrade to version Spring Framework 5.3.7 and Spring Security 5.5.1 due to CVE-2021-22112 and CVE-2021-22119 mailing-listx_refsource_MLIST
- x_refsource_MISC
- x_refsource_MISC