Spring Framework Log Injection Vulnerability in libspring-java Package

libspring-java Updated 02 Oct 2025

Summary

28/10/2021
N/A
No i
Medium
4.3

UBUNTU-CVE-2021-22096: In Spring Framework versions 5.3.0 - 5.3.10, 5.2.0 - 5.2.17, and older unsupported versions, it is possible for a user to provide malicious input to cause the insertion of additional log entries. Affects libspring-java versions 3.0.6.RELEASE-10 – 3.0.6.RELEASE-9. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The libspring-java package is a core component of the Spring Framework, which is widely used for building Java applications. It provides comprehensive infrastructure support for developing Java applications, including features for dependency injection, transaction management, and aspect-oriented programming. The package is essential for developers looking to create robust and scalable applications. However, it has been identified to have a vulnerability that allows malicious input to be logged improperly, potentially leading to log injection attacks.

Vulnerability Detail

In Spring Framework versions 5.3.0 - 5.3.10, 5.2.0 - 5.2.17, and older unsupported versions, a vulnerability exists that allows a user to provide malicious input, resulting in the insertion of additional log entries. This can lead to unauthorized information disclosure or manipulation of log data, which can be exploited by attackers to obfuscate their activities or inject misleading information into logs.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can sanitize user inputs before logging them to prevent any malicious data from being logged. This can be done by implementing input validation and escaping special characters in the input strings.

Conclusion

The identified vulnerability in the libspring-java package poses a risk of log injection, which can lead to serious security implications. It is crucial for users to update their packages to the latest patched versions and implement necessary workarounds to safeguard their applications.

See every vulnerability recorded for libspring-java →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 4.3, indicating a medium severity level.

You can use Vulert, which allows you to monitor and alert in real-time for open-source vulnerabilities. You can check your application using the Vulert playground without any signup.

The potential consequences include unauthorized access to sensitive information, manipulation of log data, and the ability for attackers to cover their tracks.

Yes, it is recommended to use versions of libspring-java that are beyond 5.3.10 or 5.2.17 to avoid this vulnerability.

If you cannot update the package immediately, implement input validation and sanitization as a temporary measure to mitigate the risk of log injection.

Related vulnerabilities

Recent vulnerabilities recorded for libspring-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback