CVE-2025-27111: Escape Sequence Injection vulnerability in Rack lead to Possible Log Injection

Published Mar 4, 2025
·
Updated

Summary

Rack::Sendfile can be exploited by crafting input that includes newline characters to manipulate log entries.

Details

The Rack::Sendfile middleware logs unsanitized header values from the X-Sendfile-Type header. An attacker can exploit this by injecting escape sequences (such as newline characters) into the header, resulting in log injection.

Impact

This vulnerability can distort log files, obscure attack traces, and complicate security auditing.

Mitigation

- Update to the latest version of Rack, or - Remove usage of Rack::Sendfile.

Other sources

Rack is a modular Ruby web server interface. The Rack::Sendfile middleware logs unsanitised header values from the X-Sendfile-Type header. An attacker can exploit this by injecting escape sequences (such as newline characters) into the header, resulting in log injection. This vulnerability is fixed in 2.2.12, 3.0.13, and 3.1.11.

NVD

Affected Software

7 affected componentsFixes available
rubygems/rack>=3.1<3.1.11
3.1.11
rubygems/rack>=3.0<3.0.13
3.0.13
rubygems/rack<2.2.12
2.2.12
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.12
Rack Rack Ruby>=3.0.0<3.0.13
Rack Rack Ruby>=3.1.0<3.1.11

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.11
  2. Upgrade

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

    Fixed in 3.0.13
  3. Upgrade

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

    Fixed in 2.2.12
  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.12
  6. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.0.13
  7. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.1.11
  8. Remove

    Remove Rack::Sendfile from your environment.

    Remove usage of the Rack::Sendfile middleware, since it logs unsanitised header values from the X-Sendfile-Type header.

Event History

Mar 4, 2025
CVE Published
via MITRE·03:26 PM
Data Sourced
via MITRE·03:26 PM
DescriptionWeakness
Advisory Published
via GitHub·03:27 PM
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
RemedyAffected Software
Mar 29, 2025
Data Sourced
via Ubuntu·08:36 AM
RemedyDescriptionSeverityAffected Software
May 14, 58462
Event
via NVD·11:12 PM

Frequently Asked Questions

1

What is the severity of CVE-2025-27111?

CVE-2025-27111 has a medium severity level due to the potential for log manipulation via crafted header input.

2

How do I fix CVE-2025-27111?

To fix CVE-2025-27111, upgrade to Rack version 3.1.11, 3.0.13, or 2.2.12 or later.

3

What systems are affected by CVE-2025-27111?

CVE-2025-27111 affects versions of Rack prior to 3.1.11, 3.0.13, and is relevant for versions up to 2.2.12.

4

What is the primary issue with CVE-2025-27111?

The primary issue with CVE-2025-27111 is the logging of unsanitized header values from the X-Sendfile-Type header.

5

Can CVE-2025-27111 lead to further attacks?

Yes, CVE-2025-27111 can potentially lead to further attacks involving log injection and information disclosure.

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