RubyGems
CVE-2026-125110
Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch
- Severity
- Medium 5.3
- Published
- 10 Nov 2026
- Last changed
- 10 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.2.25, 3.1.23, 3.2.8
- Exploit chance
- 0.3% in the next 30 daysHigher than 16% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- CWE-180
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N- Also known as
- GHSA-wvg4-6p58-3gh3
- Sources
- OSV.dev and GitHub
Description
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.
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.
Workarounds
- Update to a patched version of Rack in which header_rules are 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::Static header_rules to prevent inline rendering of untrusted uploads; serve them from a separate origin.
Affected software
| Software | Affected versions |
|---|---|
rackRubyGems · osv:RubyGems:rack |
|
About rack
- Total downloads (RubyGems)
- 1,398,166,843RubyGems, 24 Nov 2026
Vulnerabilities in rack
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-125111Rack: Multipart parsing allows DoS via unbounded scan buffer growthHigh 7.5 10 Nov 2026
- CVE-2026-125108Rack: Multipart boundary ambiguity guard in Rack::Multipart::Parser can be bypassed with a quoted boundary value, allowing WAF bypassLow 3.7 10 Nov 2026
- CVE-2026-125109Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835Medium 4.8 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-125110
- GitHub Advisory Database https://github.com/advisories/GHSA-wvg4-6p58-3gh3