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.

Severity (CVSS 4.0)5.7Medium
Exploit odds (30 days)1.2%top 32.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12ruby-rack2.2.13-1~deb12u1DEBIAN-CVE-2025-25184
Debian:12ruby-rack2.2.13-1~deb12u1DSA-5886-1
Debian:13ruby-rack3.1.12-1DEBIAN-CVE-2025-25184
Debian:14ruby-rack3.1.12-1DEBIAN-CVE-2025-25184
RubyGemsrack3.1.10GHSA-7g2v-jj9q-g3rg
RubyGemsrack2.2.11GHSA-7g2v-jj9q-g3rg
RubyGemsrack3.0.12GHSA-7g2v-jj9q-g3rg
Ubuntu:24.04:LTSruby-rack2.2.7-1ubuntu0.2USN-7366-1
Ubuntu:24.04:LTSruby-rack2.2.7-1ubuntu0.2UBUNTU-CVE-2025-25184
Ubuntu:25.10ruby-rack3.1.16-0.1UBUNTU-CVE-2025-25184
Ubuntu:26.04:LTSruby-rack3.1.16-0.1UBUNTU-CVE-2025-25184

Affected products (as reported)

VendorProductVersions
rack rack < 2.2.11>= 3.0, < 3.0.12>= 3.1, < 3.1.10

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

References