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
GitHub
3.9
CVSS SCORE
5.3medium| Package | Type | OS Name | OS Version | Affected Ranges | Fix Versions |
|---|---|---|---|---|---|
| rack | gem | - | - | >=3.2.0,<3.2.6 | 3.2.6 |
| rack | gem | - | - | <2.2.23 | 2.2.23 |
| rack | gem | - | - | >=3.0.0.beta1,<3.1.21 | 3.1.21 |
CVSS:3 Severity and metrics
The CVSS metrics represent different qualitative aspects of a vulnerability that impact the overall score, as defined by the CVSS Specification.
The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology. This can mean an attack must be launched from the same shared physical (e.g., Bluetooth or IEEE 802.11) or logical (e.g., local IP subnet) network, or from within a secure or otherwise limited administrative domain (e.g., MPLS, secure VPN to an administrative network zone). One example of an Adjacent attack would be an ARP (IPv4) or neighbor discovery (IPv6) flood leading to a denial of service on the local LAN segment (e.g., CVE-2013-6014).
Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.
The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
The vulnerable system can be exploited without interaction from any user.
An exploited vulnerability can only affect resources managed by the same security authority. In this case, the vulnerable component and the impacted component are either the same, or both are managed by the same security authority.
There is some loss of confidentiality. Access to some restricted information is obtained, but the attacker does not have control over what information is obtained, or the amount or kind of loss is limited. The information disclosure does not cause a direct, serious loss to the impacted component.
There is no loss of trust or accuracy within the impacted component.
There is no impact to availability within the impacted component.
NIST
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
-