REDHAT-BUG-2345301: Medium severity rubygems/rack vulnerability

Published Feb 12, 2025
·
Updated

Rack provides an interface for developing web applications in Ruby. Prior to versions 2.2.11, 3.0.12, and 3.1.11, 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.11 contain a fix.

Affected Software

1 affected component
rubygems/rack<2.2.11, <3.0.12, <3.1.11

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.2.11
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.0.12
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.1.11

Event History

Feb 12, 2025
Data Sourced
via Red Hat·05:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using Rack::CommonLogger are exposed when attacker-controlled usernames can reach env['REMOTE_USER'], such as through successful Rack::Auth::Basic authentication or logging of login attempts. Exposure depends on allowing or accepting usernames containing CRLF and whitespace characters.

2

What does an attacker need to exploit it?

An attacker needs to supply a username containing newline characters that is subsequently logged by Rack::CommonLogger. This can occur if the application permits creation or use of such a username, or logs login attempts containing the supplied username.

3

What is the impact of successful exploitation?

An attacker can manipulate log output by breaking expected log formatting or inserting fraudulent log entries. This may obscure legitimate activity or inject malicious data into log files.

4

Which Rack releases contain the fix?

The issue is fixed in Rack versions 2.2.11, 3.0.12, and 3.1.11.

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