cvelo
P3 · MediumCVSS 5.3EPSS 0.8%

Rack: `Rack::Directory` lists directories outside the root when `..` follows a symbolic link.

  • CVE-2026-142593
  • GHSA-mhj6-xc86-54m8
  • EUVD-2026-141928

Description

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.

Text from the CVE.org record.

Recommendation

Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • rack

    Affected versionsFixed in
    >= 2.2.0, < 2.2.26none stated
    >= 3.0.0, < 3.1.24none stated
    >= 3.2.0, < 3.2.9none stated
  • rackRubyGems

    Affected versionsFixed in
    from 3.2.0 to before 3.2.93.2.9
    from 3.0.0 to before 3.1.243.1.24
    from 2.2.0 to before 2.2.262.2.26

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.