CVE-2026-125110: Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch
Summary Rack::Static normalizes the request path with Utils.cleanpathinfo when deciding which file to serve, but matches headerrules against a path that is only URL-decoded. A request containing dot segments, raw or percent-encoded, is served the normalized target file while the header rules for that file's location are not applied.
Published Nov 10, 2026
Affected packages
rack
- Ecosystem
- RubyGems
- Affected
- < 2.2.25
- Fixed in
- 2.2.25
- Check
bundle info rack
rack
- Ecosystem
- RubyGems
- Affected
- >= 3.0.0, < 3.1.23
- Fixed in
- 3.1.23
- Check
bundle info rack
rack
- Ecosystem
- RubyGems
- Affected
- >= 3.2.0, < 3.2.8
- Fixed in
- 3.2.8
- Check
bundle info rack
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Rack::Static normalizes the request path with Utils.clean_path_info when deciding which file to serve, but matches header_rules against a path that is only URL-decoded. A request containing dot segments, raw or percent-encoded, is served the normalized target file while the header rules for that file's location are not applied.
This allows an attacker to receive a protected static file without the security headers configured for it.
Details
Rack::Static#call computes the served path as Utils.clean_path_info(Utils.unescape_path(path)). Rack::Static#applicable_rules applies only Utils.unescape_path before testing string and regular expression rules. A request for /assets/../uploads/file.html or /assets/..%2fuploads/file.html is served as uploads/file.html, but the decoded path /assets/../uploads/file.html does not start with uploads, so a rule scoped to that directory never matches.
The fix for CVE-2026-34786 (GHSA-q4qf-9j86-f5mh) added URL decoding to rule matching but did not add dot segment normalization, so versions that include that fix remain affected.
Impact
Applications that use Rack::Static header_rules to attach security-relevant headers to particular paths or file types are affected. An unauthenticated attacker who knows the path of a protected file can request it through a dot segment path and receive it without those headers, for example without Content-Disposition: attachment or a restrictive Content-Security-Policy that prevents uploaded HTML from rendering inline. The file itself is served unchanged. Applications that do not use path-specific header_rules are not affected.
Mitigation
- Update to a patched version of Rack in which
header_rulesare matched against the same normalized path used to serve the file. - Reject requests containing dot segments at a reverse proxy or application boundary.
- Do not rely solely on
Rack::Staticheader_rulesto prevent inline rendering of untrusted uploads; serve them from a separate origin.
Credit
- Reporter and Remediation developer
Credited to thesmartshadow, ioquatix.
References
- https://github.com/rack/rack/security/advisories/GHSA-wvg4-6p58-3gh3
- https://nvd.nist.gov/vuln/detail/CVE-2026-125110
- https://github.com/rack/rack/commit/18a07fe553afb4d8a678d6a948cd6ba1e11e28be
- https://github.com/rack/rack/commit/9d7f19484ffd5ed5e032678c26ee6eff96d3a0a3
- https://github.com/rack/rack/commit/e88097ccb88be44d06d47b42daffe04929516ee4
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-wvg4-6p58-3gh3.yml
- https://github.com/advisories/GHSA-wvg4-6p58-3gh3
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-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, 2026CVE-2026-32762
Rack: Forwarded Header semicolon injection enables Host and Scheme spoofing
medium4.8Apr 2, 2026
