Vulnerability · Published Feb 12, 2025 · Assigned by GitHub_M
CVE-2025-25184Possible Log Injection in Rack::CommonLogger
Medium 5.7
In plain English
A medium-severity security flaw in rack from rack. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 68% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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['REMOTE_USER'] 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-rack | 2.2.13-1~deb12u1 | DEBIAN-CVE-2025-25184 |
| Debian:12 | ruby-rack | 2.2.13-1~deb12u1 | DSA-5886-1 |
| Debian:13 | ruby-rack | 3.1.12-1 | DEBIAN-CVE-2025-25184 |
| Debian:14 | ruby-rack | 3.1.12-1 | DEBIAN-CVE-2025-25184 |
| RubyGems | rack | 3.1.10 | GHSA-7g2v-jj9q-g3rg |
| RubyGems | rack | 2.2.11 | GHSA-7g2v-jj9q-g3rg |
| RubyGems | rack | 3.0.12 | GHSA-7g2v-jj9q-g3rg |
| Ubuntu:24.04:LTS | ruby-rack | 2.2.7-1ubuntu0.2 | USN-7366-1 |
| Ubuntu:24.04:LTS | ruby-rack | 2.2.7-1ubuntu0.2 | UBUNTU-CVE-2025-25184 |
| Ubuntu:25.10 | ruby-rack | 3.1.16-0.1 | UBUNTU-CVE-2025-25184 |
| Ubuntu:26.04:LTS | ruby-rack | 3.1.16-0.1 | UBUNTU-CVE-2025-25184 |
Affected products (as reported)
Weakness: CWE-93, CWE-117 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P