ghsa-7g2v-jj9q-g3rg
Vulnerability from github
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['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.
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.
{ "affected": [ { "package": { "ecosystem": "RubyGems", "name": "rack" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.2.11" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "RubyGems", "name": "rack" }, "ranges": [ { "events": [ { "introduced": "3.0" }, { "fixed": "3.0.12" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "RubyGems", "name": "rack" }, "ranges": [ { "events": [ { "introduced": "3.1" }, { "fixed": "3.1.10" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-25184" ], "database_specific": { "cwe_ids": [ "CWE-117", "CWE-93" ], "github_reviewed": true, "github_reviewed_at": "2025-02-12T19:18:35Z", "nvd_published_at": "2025-02-12T17:15:24Z", "severity": "MODERATE" }, "details": "## Summary\n\n`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.\n\n## Details\n\nWhen a user provides the authorization credentials via `Rack::Auth::Basic`, if success, the username will be put in `env[\u0027REMOTE_USER\u0027]` and later be used by `Rack::CommonLogger` for logging purposes.\n\nThe 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.\n\n## Impact\n\nAttackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files.\n\n## Mitigation\n\n- Update to the latest version of Rack.", "id": "GHSA-7g2v-jj9q-g3rg", "modified": "2025-02-18T15:04:49Z", "published": "2025-02-12T19:18:35Z", "references": [ { "type": "WEB", "url": "https://github.com/rack/rack/security/advisories/GHSA-7g2v-jj9q-g3rg" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-25184" }, { "type": "WEB", "url": "https://github.com/rack/rack/commit/074ae244430cda05c27ca91cda699709cfb3ad8e" }, { "type": "PACKAGE", "url": "https://github.com/rack/rack" }, { "type": "WEB", "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-25184.yml" } ], "schema_version": "1.4.0", "severity": [ { "score": "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", "type": "CVSS_V4" } ], "summary": "Possible Log Injection in Rack::CommonLogger" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.