CVE-2025-27610: Local File Inclusion in Rack::Static
Summary Rack::Static can serve files under the specified root: even if urls: are provided, which may expose other files under the specified root: unexpectedly. Details The vulnerability occurs because Rack::Static does not properly sanitize user-supplied paths before serving files.
Published Mar 10, 2025 · Updated Nov 4, 2025
Affected packages
rack
- Ecosystem
- RubyGems
- Affected
- < 2.2.13
- Fixed in
- 2.2.13
- Check
bundle info rack
rack
- Ecosystem
- RubyGems
- Affected
- >= 3.0, < 3.0.14
- Fixed in
- 3.0.14
- Check
bundle info rack
rack
- Ecosystem
- RubyGems
- Affected
- >= 3.1, < 3.1.12
- Fixed in
- 3.1.12
- Check
bundle info rack
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Rack::Static can serve files under the specified root: even if urls: are provided, which may expose other files under the specified root: unexpectedly.
Details
The vulnerability occurs because Rack::Static does not properly sanitize user-supplied paths before serving files. Specifically, encoded path traversal sequences are not correctly validated, allowing attackers to access files outside the designated static file directory.
Impact
By exploiting this vulnerability, an attacker can gain access to all files under the specified root: directory, provided they are able to determine then path of the file.
Mitigation
- Update to the latest version of Rack, or
- Remove usage of
Rack::Static, or - Ensure that
root:points at a directory path which only contains files which should be accessed publicly.
It is likely that a CDN or similar static file server would also mitigate the issue.
Credited to Masamuneee, jeremyevans, ioquatix.
References
- https://github.com/rack/rack/security/advisories/GHSA-7wqh-767x-r66v
- https://github.com/rack/rack/commit/50caab74fa01ee8f5dbdee7bb2782126d20c6583
- https://nvd.nist.gov/vuln/detail/CVE-2025-27610
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-27610.yml
- https://lists.debian.org/debian-lts-announce/2025/03/msg00016.html
- https://github.com/advisories/GHSA-7wqh-767x-r66v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More RubyGems vulnerabilities
All RubyGems entriesCVE-2026-125108
Rack: Multipart boundary ambiguity guard in Rack::Multipart::Parser can be bypassed with a quoted boundary value, allowing WAF bypass
low3.7Nov 10, 2026CVE-2026-125109
Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835
medium4.8Nov 10, 2026CVE-2026-125110
Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch
medium5.3Nov 10, 2026CVE-2026-125111
Rack: Multipart parsing allows DoS via unbounded scan buffer growth
high7.5Nov 10, 2026CVE-2026-26961
Rack's greedy multipart boundary parsing can cause parser differentials and WAF bypass.
medium5.3Apr 2, 2026CVE-2026-26962
Rack's improper unfolding of folded multipart headers preserves CRLF in parsed parameter values
medium4.8Apr 2, 2026
