All vulnerabilities

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

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.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
rackRubyGems · osv:RubyGems:rack
  • Every version before 2.2.25
  • From 3.0.0 before 3.1.23
  • From 3.2.0 before 3.2.8

About rack

Total downloads (RubyGems)
1,398,166,843RubyGems, 24 Nov 2026

References