{"id":"CVE-2026-34786","published":"2026-04-02T16:44:59Z","modified":"2026-04-03T17:38:11Z","title":"Rack: Rack::Static header_rules bypass via URL-encoded paths","vendor":"rack","product":"rack","tier":"tail","description":{"text":"Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Static#applicable_rules evaluates several header_rules types against the raw URL-encoded PATH_INFO, while the underlying file-serving path is decoded before the file is served. As a result, a request for a URL-encoded variant of a static path can serve the same file without the headers that header_rules were intended to apply. In deployments that rely on Rack::Static to attach security-relevant response headers to static content, this can allow an attacker to bypass those headers by requesting an encoded form of the path. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00207,"percentile":0.1097,"provenance":"source"},"cwes":[{"id":"CWE-180","name":"Incorrect Behavior Order: Validate Before Canonicalize"}],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-q4qf-9j86-f5mh","tags":["x_refsource_CONFIRM"]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":2.19},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"rack","affectedVersions":[{"vendor":"rack","product":"rack","versions":["< 2.2.23",">= 3.0.0.beta1, < 3.1.21",">= 3.2.0, < 3.2.6"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-04-03T17:37:20.498682Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"rack","vulnerableRanges":["<2.2.23",">=3.0.0.beta1, <3.1.21",">=3.2.0, <3.2.6"],"patched":["2.2.23","3.1.21","3.2.6"],"from":["GHSA-q4qf-9j86-f5mh"],"provenance":"source"}],"summary":{"text":"A flaw in Rack's Rack::Static middleware (the rack gem) causes its header_rules evaluation to run against the raw, URL-encoded request path while the file itself is served from the decoded path. An unauthenticated remote attacker who can send HTTP requests to an application using Rack::Static can request an encoded variant of a static file path to obtain the same file without the response headers that header_rules were meant to apply, provided the deployment depends on Rack::Static for those security-relevant headers.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:26Z"},"euvd":{"id":"EUVD-2026-18384","exploited":false,"provenance":"source"}}