CVE-2021-22060: Log Entry Injection in Spring Framework
Summary
CVE-2021-22060: Log entry injection in Spring Framework. Affects org.springframework:spring-core across 2 version ranges.
>= 5.2.0, < 5.2.19
>= 5.3.0, < 5.3.14
Fixed in 5.2.19 or 5.3.14, depending on the release line you run. How to fix ↓
Also tracked for
- libspring-java · Debian:11
The same CVE-2021-22060 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Spring Framework is a popular open-source application framework for Java. It provides comprehensive infrastructure support for developing Java applications. The 'org.springframework:spring-core' package is a core component of the Spring Framework, providing essential functionality for dependency injection, resource management, and logging. This vulnerability affects versions 5.3.0 - 5.3.13, 5.2.0 - 5.2.18, and older unsupported versions of the Spring Framework.
Vulnerability Detail
The vulnerability, identified as CVE-2021-22060, allows an attacker to inject malicious input that can result in the insertion of additional log entries. This vulnerability is a follow-up to CVE-2021-22096 and provides protection against additional types of input and more places in the Spring Framework codebase. An attacker with the ability to manipulate log entries can potentially disrupt the normal functioning of the application, manipulate logs for malicious purposes, or cause log flooding, leading to denial of service.
How To Fix
Latest published version: 7.1.0-RC1 as of 22 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 5.2.0, < 5.2.195.2.19 -
>= 5.3.0, < 5.3.145.3.14
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. Upgrading to the fixed versions is the recommended solution.
Conclusion
CVE-2021-22060 is a moderate severity vulnerability in the Spring Framework that allows for log entry injection. Upgrading to the fixed versions of the 'org.springframework:spring-core' package is recommended to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.springframework:spring-core →
FAQ
This vulnerability allows an attacker to manipulate log entries, potentially leading to disruption of the application, log manipulation for malicious purposes, or denial of service through log flooding.
Versions 5.3.0 - 5.3.13, 5.2.0 - 5.2.18, and older unsupported versions of the Spring Framework are affected.
There is no known exploit available for this vulnerability at the time of this report.
The recommended mitigation is to upgrade to the fixed versions of the 'org.springframework:spring-core' package.
You can find more information about this vulnerability in the GitHub Advisory Database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/01/GHSA-6gf2-pvqw-37ph/GHSA-6gf2-pvqw-37ph.json
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework:spring-core.