Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify symlinked dir under Rack::Directory root
-
DeliverySend request like /system/../ or /system/%2E%2E/config/
-
ExploitLexical expand_path check wrongly allows path
-
ExecutionOS resolves symlink before applying ..
-
PersistDir.foreach lists parent/siblings outside root
-
ImpactDisclose entry names, sizes, modification times
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two concrete conditions, both drawn from the advisory: (1) the application mounts Rack::Directory (directly or via rackup with a directory application) and exposes it to untrusted clients, and (2) a directory beneath the served root is a symbolic link to a directory elsewhere on the filesystem - the Capistrano convention of linking public/system, public/uploads, or public/assets into a release-independent shared/ directory is the canonical trigger. The attacker then requests a path such as /system/../ or percent-encoded /system/%2E%2E/config/. Limiting factors that reduce real-world risk: no symlink means no vulnerability (default Rack::Directory without symlinked subdirectories is not exploitable this way); the climb is bounded to one level above each symlink target, extendable only by further symlinks discovered in listings; and disclosure is restricted to directory entry names, sizes, and modification times - file contents are NOT readable because Rack::Files normalizes paths with Utils.clean_path_info before serving. No authentication, malformed HTTP, or large payload is required. |
| Impact | This is a genuine but bounded issue, best characterized as a low-impact information disclosure rather than a top-priority emergency. The provided CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N = 5.3, Medium) and the vuln.today Decision label 'this_month' agree: network-reachable, unauthenticated, low complexity, but only a partial confidentiality impact and no integrity or availability impact. No EPSS score and no CISA KEV entry were supplied, and no standalone exploit is listed in the input, so exploitation status is 'no public exploit identified at time of analysis' - though note the official fix commit (42af7a7b) ships a test that reproduces the traversal, so the mechanism is fully and publicly documented even if weaponized exploit code is not referenced. The most important nuance the raw CVSS score hides is the precondition: exploitation requires a specific deployment shape - a symbolic link to a directory beneath a root served by Rack::Directory - which the PR:N/AC:L metrics do not capture because the symlink is an environmental condition, not an attacker-supplied one. So while the vector reads as 'remote unauthenticated,' real exposure is limited to the subset of deployments that both expose Rack::Directory to untrusted clients and use symlinked subdirectories (the common Capistrano public/system → shared/ convention). Impact is also capped: only directory entry names, sizes, and modification times leak, because Rack::Files normalizes paths before serving file contents, so secrets like config/master.key or database.yml are named but not readable. Net: prioritize for patching within the normal cycle (consistent with 'this_month'), elevated only for Ruby apps that actually serve directory listings with symlinks. |
| Exploit ScenarioDerived | An unauthenticated attacker browsing a Ruby app that mounts Rack::Directory (e.g. a Capistrano deployment where public/system is a symlink into a release-independent shared/ directory) requests /system/../ or /system/%2E%2E/config/. The lexical File.expand_path check passes because it sees the path climbing back toward root, but the kernel resolves the symlink before applying '..', so the request lists the parent and siblings of the link target - exposing the names, sizes, and modification times of files such as database.yml, master.key, logs, and PID files that live outside the served root. No PoC is referenced in the input, but the fix commit includes a reproducing test demonstrating the exact requests. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
Directory-listing path traversal in Rack's Rack::Directory middleware (2.2.0 through 2.2.25, 3.0.x through 3.1.23, and 3.2.x through 3.2.8) allows unauthenticated remote attackers to enumerate directory entry names, sizes and modification times outside the served root, with no public exploit identified at time of analysis. The flaw only manifests when Rack::Directory is mounted for untrusted clients and a directory beneath the served root is a symbolic link to a directory elsewhere on disk - the common Capistrano pattern of linking public/system, public/uploads or public/assets into a release-independent shared/ tree, which frequently also holds config/database.yml, config/master.key, logs and PID files. Impact is bounded to metadata disclosure, since file contents are not readable through this path; priority is this_month rather than immediate. Percent-encoded forms such as %2E%2E behave identically, and the climb is limited to one level above each symlink target, extendable only by further symlinks discovered in listings.
RemediationAI
Vendor-released patches fix the issue in Rack 2.2.26, 3.1.24 and 3.2.9 - upgrade to the release matching your branch, referencing the advisories at https://github.com/rack/rack/security/advisories/GHSA-mhj6-xc86-54m8 and the fix commits 42af7a7b10c54021e060e52c91a590a5d5f2a48d, c7102e91e4a1ee832b006790de31b3d5b207b89e and d73bdad9e2ebec7217ecd3e9bbc079f076b0d120. If an immediate upgrade is not possible, the advisory's own mitigations are: remove symbolic links to directories under any root served by Rack::Directory (in Capistrano deployments this means not linking public/system, public/uploads or public/assets into shared/, which may require restructuring deploy layouts or serving those paths statically instead), stop exposing Rack::Directory to untrusted clients, or configure the reverse proxy in front of the application to reject request paths containing .. or %2E%2E segments - bearing in mind that a blanket dot-dot rejection can break clients or routers that legitimately emit such sequences, so validate against real traffic first. Note the fix normalizes the request path with Utils.clean_path_info before any filesystem access, matching what Rack::Files already did.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Rack is the modular Ruby web server interface, and Rack::Directory is the middleware that serves browsable directory listings. The root cause class is CWE-22 (path traversal), with the advisory also tagging CWE-59 (link following): Rack::Directory#get evaluated containment with a purely lexical File.expand_path on the joined root+PATH_INFO string, but then passed the original unnormalized path to File.stat and Dir.foreach. Because the kernel resolves a symbolic link before applying a following .. segment, a request like /system/../ passed the lexical check (expanding to the root's parent directory name) while the filesystem walked from the link target's parent. For example, with public/system linked to shared/system, File.expand_path("public/system/../") yields "public" and is permitted, but Dir.foreach("public/system/../") is resolved by the OS as shared/system/.. which is shared. Rack::Files, which Rack::Directory delegates to for actual file serving, already normalized with Utils.clean_path_info, which is why contents do not leak. The upstream fix adds Utils.clean_path_info before the filesystem access in get and changes the Parent Directory row stat call to use File.dirname(path) when the entry is '..'. Versions before 2.2.0 rejected any path containing dot-dot and are not affected.
Know when Rack gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Remote unauthenticated request with no user interaction (PR:N/UI:N/AV:N/AC:L); the symlink is an environmental precondition, not attacker complexity; only metadata leaks so C:L, I:N, A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Rack is a modular Ruby web server interface. From 2.2.0 until 2.2.26, 3.1.24, and 3.2.9, Rack::Directory#get checks a path containing dot-dot segments with File.expand_path but then passes the original unnormalized path to File.stat and Dir.foreach instead of first applying Utils.clean_path_info. Earlier Rack versions reject every path containing dot-dot and are not affected. When a directory beneath the served root is a symbolic link followed by .., the operating system resolves the link before applying the dot-dot segment, allowing an unauthenticated request to list the target's parent or siblings outside the root. The disclosure is limited to directory entry names, sizes, and modification times because Rack::Files normalizes paths before serving file contents. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Directory traversal in Rack versions prior to 2.2.22, 3.1.20, and 3.2.5 allows unauthenticated remote attackers to list
Rack is a modular Ruby web server interface. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable,
Rack is a modular Ruby web server interface. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable,
A reliance on cookies without validation/integrity check security vulnerability exists in rack < 2.2.3, rack < 2.1.4 tha
A sequence injection vulnerability exists in Rack <2.0.9.1, <2.1.4.1 and <2.2.3.1 which could allow is a possible shell
Rack provides an interface for developing web applications in Ruby. Rated medium severity (CVSS 5.7), this vulnerability
Rack's Directory module fails to sanitize filenames when generating HTML directory listings, allowing attackers to craft
Session authentication bypass in Rack::Session::Cookie 2.0.0 through 2.1.1 allows unauthenticated remote attackers to fo
A directory traversal vulnerability exists in rack < 2.2.0 that allows an attacker perform directory traversal vulnerabi
Rack::Session::Cookie in Rack 1.5.x before 1.5.2, 1.4.x before 1.4.5, 1.3.x before 1.3.10, 1.2.x before 1.2.8, and 1.1.x
A DoS vulnerability exists in Rack <v3.0.4.2, <v2.2.6.3, <v2.1.4.3 and <v2.0.9.3 within in the Multipart MIME parsing co
Memory exhaustion denial of service in the Ruby Rack web server interface (versions prior to 2.2.19, 3.1.17, and 3.2.2)
EUVD-2026-141928
NVD
CVE.org
EPSS
GitHub
Exploit-DB