CVE-2025-27111 — Escape Sequence Injection vulnerability in rack
Escape Sequence Injection vulnerability in Rack lead to Possible Log Injection
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.83%). Schedule for your next planned update.
Does your project use an affected rack version?
Paste your Gemfile.lock to check it for CVE-2025-27111 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published March 4, 2025 (632 days ago).
- Last revised September 10, 2026 — 555 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install rack -v 3.0.13
gem install rack -v 2.2.12
gem install rack -v 3.1.11
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: RubyGems (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-117
- CWE-93
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
References
- https://github.com/rack/rack/security/advisories/GHSA-8cgq-6mh2-7j6vWEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-27111ADVISORY
- https://github.com/rack/rack/commit/803aa221e8302719715e224f4476e438f2531a53WEB
- https://github.com/rack/rack/commit/aeac570bb8080ca7b53b7f2e2f67498be7ebd30bWEB
- https://github.com/rack/rack/commit/b13bc6bfc7506aca3478dc5ac1c2ec6fc53f82a3WEB
- https://github.com/rack/rackPACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-27111.ymlWEB
- https://lists.debian.org/debian-lts-announce/2025/03/msg00016.htmlWEB
Frequently Asked Questions
- What is CVE-2025-27111?
- Escape Sequence Injection vulnerability in Rack lead to Possible Log Injection. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2025-27111?
- CVE-2025-27111 affects rack. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-27111 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 54.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-46727HIGH
Rack has an Unbounded-Parameter DoS in Rack::QueryParser
- CVE-2026-34785HIGH
Rack::Static prefix matching can expose unintended files under the static root
- CVE-2018-16470HIGH
Rack vulnerable to Denial of Service
- CVE-2022-30122HIGH
Denial of Service Vulnerability in Rack Multipart Parsing
- CVE-2020-8184HIGH
Rack allows Percent-encoded cookies to overwrite existing prefixed cookie names
- CVE-2026-22860HIGH
Rack has a Directory Traversal via Rack:Directory
- CVE-2025-61770HIGH
Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion)
- CVE-2019-16782MEDIUM
Possible Information Leak / Session Hijack Vulnerability in Rack