CVE-2026-34763 — Vulnerability in rack — CVE Details
Rack has a root directory disclosure via unescaped regex interpolation in Rack::Directory
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.35%). Schedule for your next planned update.
Does your project use an affected rack version?
Paste your Gemfile.lock to check it for CVE-2026-34763 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
Rack::Directory interpolates the configured root path directly into a regular expression when deriving the displayed directory path. If root contains regex metacharacters such as +, *, or ., the prefix stripping can fail and the generated directory listing may expose the full filesystem path in the HTML output.
Details
Rack::Directory::DirectoryBody#each computes the visible path using code equivalent to:
show_path = Utils.escape_html(path.sub(/\A#{root}/, ''))
Here, root is a developer-configured filesystem path. It is normalized earlier with File.expand_path(root) and then inserted directly into a regular expression without escaping.
Because the value is treated as regex syntax rather than as a literal string, metacharacters in the configured path can change how the prefix match behaves. When that happens, the expected root prefix is not removed from path, and the absolute filesystem path is rendered into the HTML directory listing.
Impact
If Rack::Directory is configured to serve a directory whose absolute path contains regex metacharacters, the generated directory listing may disclose the full server filesystem path instead of only the request-relative path.
This can expose internal deployment details such as directory layout, usernames, mount points, or naming conventions that would otherwise not be visible to clients.
Mitigation
- Update to a patched version of Rack in which the root prefix is removed using an escaped regular expression.
- Avoid using
Rack::Directorywith a root path that contains regular expression metacharacters.
Advisory Timeline
- First published April 2, 2026 (238 days ago).
- Last revised September 10, 2026 — 160 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install rack -v 2.2.23
gem install rack -v 3.2.6
gem install rack -v 3.1.21
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: RubyGems (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-625
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
References
Frequently Asked Questions
- What is CVE-2026-34763?
- Rack has a root directory disclosure via unescaped regex interpolation in Rack::Directory. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2026-34763?
- CVE-2026-34763 affects rack. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-34763 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 21.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-46727HIGH
Rack has an Unbounded-Parameter DoS in Rack::QueryParser
- CVE-2026-34785HIGH
Rack::Static prefix matching can expose unintended files under the static root
- CVE-2018-16470HIGH
Rack vulnerable to Denial of Service
- CVE-2022-30122HIGH
Denial of Service Vulnerability in Rack Multipart Parsing
- CVE-2020-8184HIGH
Rack allows Percent-encoded cookies to overwrite existing prefixed cookie names
- CVE-2026-22860HIGH
Rack has a Directory Traversal via Rack:Directory
- CVE-2025-61770HIGH
Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion)
- CVE-2019-16782MEDIUM
Possible Information Leak / Session Hijack Vulnerability in Rack