CVE-2026-34786 Details
Description
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.
A vulnerability exists in Rack, a Ruby web server interface, in versions prior to 2.2.23, 3.0, 3.1.21, and 3.2.6. The issue arises in the Rack::Static component, where the header_rules evaluation process creates a mismatch between URL-encoded and decoded paths. This can lead to security headers being bypassed for static files. In deployments relying on Rack::Static to apply important response headers, an attacker could exploit this vulnerability by requesting an encoded version of a static file path, thereby evading the intended header protections.
Users are advised to update to Rack versions 2.2.23, 3.1.21, or 3.2.6. For applications that depend on Rack::Static header_rules for security headers, consider applying these headers at the reverse proxy or web server level, where they can consistently address both encoded and unencoded paths. Additionally, normalize or reject encoded path variants for static content at the edge, when possible.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/rack/rack/security/advisories/GHSA-q4qf-9j86-f5mh | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-180 | Incorrect Behavior Order: Validate Before Canonicalize | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| rack rack | < 2.2.23 >= 3.0.0, < 3.1.21 >= 3.2.0, < 3.2.6 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 16, 2026 | Initial Analysis | [email protected] |
| Apr 2, 2026 | New CVE Received | [email protected] |