CVE-2025-25184: Possible Log Injection in Rack::CommonLogger

Published Feb 12, 2025
·
Updated

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

8 affected componentsFixes available
Rack CommonLogger<2.2.11, <3.0.12, <3.1.11
rubygems/rack>=3.1<3.1.10
3.1.10
rubygems/rack>=3.0<3.0.12
3.0.12
rubygems/rack<2.2.11
2.2.11
debian/ruby-rack<=2.1.4-3+deb11u2, <=2.2.6.4-1+deb12u1
2.1.4-3+deb11u32.2.13-1~deb12u13.1.12-1
Rack Rack Ruby<2.2.11
Rack Rack Ruby>=3.0.0<3.0.12
Rack Rack Ruby>=3.1.0<3.1.10

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/rack to a version that resolves this vulnerability.

    Fixed in 3.1.10
  2. Upgrade

    Upgrade rubygems/rack to a version that resolves this vulnerability.

    Fixed in 3.0.12
  3. Upgrade

    Upgrade rubygems/rack to a version that resolves this vulnerability.

    Fixed in 2.2.11
  4. Upgrade

    Upgrade debian/ruby-rack to a version that resolves this vulnerability.

    Fixed in 2.1.4-3+deb11u3Fixed in 2.2.13-1~deb12u1Fixed in 3.1.12-1
  5. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 2.2.11
  6. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.0.12
  7. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.1.10

Event History

Feb 12, 2025
CVE Published
via MITRE·04:20 PM
Data Sourced
via MITRE·04:20 PM
DescriptionWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
RemedyAffected Software
Advisory Published
via GitHub·07:18 PM
Mar 29, 2025
Data Sourced
via Ubuntu·08:36 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

What type of vulnerability is CVE-2025-25184?

CVE-2025-25184 is a log injection vulnerability that can manipulate log entries.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203