CVE-2021-22096: Improper Output Neutralization for Logs in Spring Framework
Summary
CVE-2021-22096: Improper Output Neutralization for Logs in Spring Framework. Affects org.springframework:spring-core across 2 version ranges.
>= 5.2.0, < 5.2.18
>= 5.3.0, < 5.3.11
Fixed in 5.2.18 or 5.3.11, depending on the release line you run. How to fix ↓
Also tracked for
- libspring-java · Debian:11
The same CVE-2021-22096 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 features and utilities for application development. Unfortunately, versions 5.3.0 - 5.3.10, 5.2.0 - 5.2.17, and older unsupported versions of the Spring Framework are vulnerable to an improper output neutralization for logs vulnerability.
Vulnerability Detail
The vulnerability allows an attacker to exploit a lack of input validation in the logging functionality of the Spring Framework. By providing malicious input, an attacker can manipulate the log entries and potentially inject additional log entries. This could lead to various security issues, such as log forging, log injection, or log injection-based attacks. The impact of this vulnerability depends on the specific usage and configuration of the affected application.
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.185.2.18 -
>= 5.3.0, < 5.3.115.3.11
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 known workaround for this vulnerability. It is recommended to apply the fix by upgrading to the latest version of the Spring Framework.
Conclusion
The improper output neutralization for logs vulnerability in the Spring Framework can be mitigated by upgrading to the latest version. It is crucial to keep the Spring Framework up to date to ensure the security and integrity of your Java applications. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.springframework:spring-core →
FAQ
The Spring Framework is an open-source application framework for Java, providing infrastructure support for developing Java applications.
The 'org.springframework:spring-core' package is a core component of the Spring Framework, offering essential features and utilities for application development.
Versions 5.3.0 - 5.3.10, 5.2.0 - 5.2.17, and older unsupported versions of the Spring Framework are affected.
The vulnerability could lead to log forging, log injection, or log injection-based attacks, depending on the specific usage and configuration of the affected application.
To fix this vulnerability, it is recommended to upgrade to the latest version of the Spring Framework.
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework:spring-core.