Rack: `Rack::Directory` lists directories outside the root when `..` follows a symbolic link
CVE-2026-142593
Summary Rack::Directory#get decides whether a request path containing .. stays inside the root by expanding it lexically with File.expandpath, but then joins the original, unnormalized path onto the root and passes it to File.stat and Dir.foreach. The operating system resolves a symbolic link before applying a .. that follows it, so when a directory under the root is a symlink, a request such as /system/../ passes the check while the filesystem lists the parent of the link's target, and /system/../config/ lists a sibling of the target. Both are outside the root. This results in disclosure of file and directory names, sizes and modification times outside the served tree. Details The check and the filesystem access use different paths: ruby def get(env) pathinfo = Utils.unescapepath(env[PATHINFO]) if clienterrorresponse = checkbadrequest(pathinfo) || checkforbidden(pathinfo) clienterrorresponse else path = ::File.join(@root, pathinfo) # unnormalized listpath(env, path, pathinfo, scriptname) # File.stat, Dir.foreach end end def checkforbidden(pathinfo) return unless pathinfo.include? ".." expandedpath = ::File.expandpath(::File.join(@root, pathinfo)) # lexical return if expandedpath…
Assessment
- CVSS
- 5.3 (v3.1)
- Severity
- Medium
- EPSS
- 0% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 3 December 2026
- Last updated
- 3 December 2026
- Weakness
- CWE-22, CWE-59
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
At the source
References
- https://github.com/rack/rack/security/advisories/GHSA-mhj6-xc86-54m8
- https://nvd.nist.gov/vuln/detail/CVE-2026-142593
- https://github.com/rack/rack/commit/42af7a7b10c54021e060e52c91a590a5d5f2a48d
- https://github.com/rack/rack/commit/c7102e91e4a1ee832b006790de31b3d5b207b89e
- https://github.com/rack/rack/commit/d73bdad9e2ebec7217ecd3e9bbc079f076b0d120
- https://github.com/rack/rack/releases/tag/v2.2.26
- https://github.com/rack/rack/releases/tag/v3.1.24
- https://github.com/rack/rack/releases/tag/v3.2.9
- https://github.com/advisories/GHSA-mhj6-xc86-54m8
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-142593