CVE-2025-25184: Possible Log Injection in Rack::CommonLogger
Summary
Rack::CommonLogger can be exploited by crafting input that includes newline characters to manipulate log entries. The supplied proof-of-concept demonstrates injecting malicious content into logs.
Details
When a user provides the authorization credentials via Rack::Auth::Basic, if success, the username will be put in env['REMOTEUSER'] and later be used by Rack::CommonLogger for logging purposes.
The issue occurs when a server intentionally or unintentionally allows a user creation with the username contain CRLF and white space characters, or the server just want to log every login attempts. If an attacker enters a username with CRLF character, the logger will log the malicious username with CRLF characters into the logfile.
Impact
Attackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files.
Mitigation
- Update to the latest version of Rack.
Other sources
Rack provides an interface for developing web applications in Ruby. Prior to versions 2.2.11, 3.0.12, and 3.1.10, Rack::CommonLogger can be exploited by crafting input that includes newline characters to manipulate log entries. The supplied proof-of-concept demonstrates injecting malicious content into logs. When a user provides the authorization credentials via Rack::Auth::Basic, if success, the username will be put in env['REMOTEUSER'] and later be used by Rack::CommonLogger for logging purposes. The issue occurs when a server intentionally or unintentionally allows a user creation with the username contain CRLF and white space characters, or the server just want to log every login attempts. If an attacker enters a username with CRLF character, the logger will log the malicious username with CRLF characters into the logfile. Attackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files. Versions 2.2.11, 3.0.12, and 3.1.10 contain a fix.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/rackto a version that resolves this vulnerability.Fixed in 3.1.10 - Upgrade
Upgrade
rubygems/rackto a version that resolves this vulnerability.Fixed in 3.0.12 - Upgrade
Upgrade
rubygems/rackto a version that resolves this vulnerability.Fixed in 2.2.11 - Upgrade
Upgrade
debian/ruby-rackto a version that resolves this vulnerability.Fixed in 2.1.4-3+deb11u3Fixed in 2.2.13-1~deb12u1Fixed in 3.1.12-1 - Upgrade
Upgrade
Rackto a version that resolves this vulnerability.Fixed in 2.2.11 - Upgrade
Upgrade
Rackto a version that resolves this vulnerability.Fixed in 3.0.12 - Upgrade
Upgrade
Rackto a version that resolves this vulnerability.Fixed in 3.1.10
Event History
Frequently Asked Questions
What is the severity of CVE-2025-25184?
CVE-2025-25184 is classified as a medium severity vulnerability due to its potential for log manipulation.
How do I fix CVE-2025-25184?
To fix CVE-2025-25184, upgrade to Rack versions 2.2.11, 3.0.12, or 3.1.11 or later.
Which versions of Rack are affected by CVE-2025-25184?
CVE-2025-25184 affects versions of Rack prior to 2.2.11, 3.0.12, and 3.1.11.
What type of vulnerability is CVE-2025-25184?
CVE-2025-25184 is a log injection vulnerability that can manipulate log entries.
Is there a proof-of-concept available for CVE-2025-25184?
Yes, a proof-of-concept demonstrating the exploitation of CVE-2025-25184 is available.