{"id":"CVE-2025-25184","published":"2025-02-12T16:20:46Z","modified":"2025-11-03T21:12:48Z","title":"Possible Log Injection in Rack::CommonLogger","vendor":"rack","product":"rack","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.7,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01151,"percentile":0.6671,"provenance":"source"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"},{"id":"CWE-117","name":"Improper Output Neutralization for Logs"}],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-7g2v-jj9q-g3rg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rack/rack/commit/074ae244430cda05c27ca91cda699709cfb3ad8e","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00016.html","tags":[]}],"priority":{"score":17.3,"factors":[{"name":"EPSS percentile","points":13.34},{"name":"CVSS severity","points":3.99}]},"vendorSlug":"rack","affectedVersions":[{"vendor":"rack","product":"rack","versions":["< 2.2.11",">= 3.0, < 3.0.12",">= 3.1, < 3.1.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-02-12T19:09:07.706810Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"rack","vulnerableRanges":["<2.2.11",">=3.0, <3.0.12",">=3.1, <3.1.10"],"patched":["2.2.11","3.0.12","3.1.10"],"from":["GHSA-7g2v-jj9q-g3rg"],"provenance":"source"}],"summary":{"text":"The flaw is in Rack::CommonLogger, the logging component of the Rack interface for Ruby web applications, which fails to neutralise CRLF and newline characters in the username taken from env['REMOTE_USER'] (set via Rack::Auth::Basic), allowing those characters to reach log files. An attacker with low privileges who can authenticate with a username containing CRLF characters can inject arbitrary content into log entries, breaking log formats or inserting fraudulent records, provided the server permits such usernames or logs every login attempt, with no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:50:08Z"},"euvd":{"id":"EUVD-2025-4075","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-rack-cve-2022-30123","parents":[{"from":"CVE-2022-30123","to":"CVE-2025-25184","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rack/common_logger.rb"],"commits":["https://github.com/rack/rack/commit/b426cc224908ec6ed6eb8729325392b048215d88","https://github.com/rack/rack/commit/074ae244430cda05c27ca91cda699709cfb3ad8e"],"basis":"shared function","functions":["log"]}]}],"packageHistory":[{"cve":"CVE-2024-26141","published":"2024-02-28","fixed":"3.0.9.1","kev":false},{"cve":"CVE-2024-26146","published":"2024-02-28","fixed":"3.0.9.1","kev":false,"link":{"from":"CVE-2024-26146","to":"CVE-2025-25184","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:rack","fromFixed":"2.2.8.1","toFixed":"2.2.11","daysApart":350},{"kind":"version-step","provenance":"source","package":"RubyGems:rack","fromFixed":"3.0.9.1","toFixed":"3.0.12","daysApart":350}]}},{"cve":"CVE-2024-39316","published":"2024-07-02","fixed":"3.1.5","kev":false,"link":{"from":"CVE-2024-39316","to":"CVE-2025-25184","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:rack","fromFixed":"3.1.5","toFixed":"3.1.10","daysApart":225}]}},{"cve":"CVE-2025-25184","published":"2025-02-12","fixed":"3.1.10","kev":false},{"cve":"CVE-2025-27111","published":"2025-03-04","fixed":"3.1.11","kev":false,"link":{"from":"CVE-2025-25184","to":"CVE-2025-27111","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:rack","fromFixed":"2.2.11","toFixed":"2.2.12","daysApart":20},{"kind":"version-step","provenance":"source","package":"RubyGems:rack","fromFixed":"3.0.12","toFixed":"3.0.13","daysApart":20}]}},{"cve":"CVE-2025-27610","published":"2025-03-10","fixed":"3.1.12","kev":false},{"cve":"CVE-2025-46727","published":"2025-05-07","fixed":"3.1.14","kev":false}],"package":"RubyGems:rack"}}