CVE-2026-34763
ADVISORY - githubSummary
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.
Common Weakness Enumeration (CWE)
Permissive Regular Expression
Permissive Regular Expression
Improper Resolution of Path Equivalence
NIST
3.9
CVSS SCORE
5.3mediumGitHub
3.9
CVSS SCORE
5.3mediumDebian
-
Ubuntu
-
CVSS SCORE
N/AmediumRed Hat
3.9
CVSS SCORE
5.3mediumminimos
MINI-5jv8-pc96-jvx6
-
minimos
MINI-78j4-q88f-gj4p
-
minimos
MINI-c5p6-gj6x-v6j7
-
minimos
MINI-f375-cccf-3796
-
minimos
MINI-j5vh-hfw2-pr25
-
minimos
MINI-j723-864v-cffp
-
minimos
MINI-m7cg-p949-j3m9
-
minimos
MINI-mgv6-748f-vvr5
-
minimos
MINI-rc2g-4879-gfch
-
minimos
MINI-rch2-3hg7-rxrw
-
minimos
MINI-rj5x-38jh-5m8j
-
minimos
MINI-rwwr-pp5j-mjh2
-
minimos
MINI-wfp9-q4m4-7922
-
minimos
MINI-x889-4pwm-c23m
-