CVE-2026-142593: Rack: `Rack::Directory` lists directories outside the root when `..` follows a symbolic link.

Published Dec 2, 2026
·
Updated

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.expandpath but then passes the original unnormalized path to File.stat and Dir.foreach instead of first applying Utils.cleanpathinfo. 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.

Affected Software

1 affected component
rubygems/rack>=2.2.0<2.2.26, >=3.1.0<3.1.24, >=3.2.0<3.2.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.2.26
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.1.24
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.2.9

Event History

Dec 2, 2026
CVE Published
via MITRE·09:39 PM
Data Sourced
via MITRE·09:39 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using Rack::Directory in Rack 2.2.0 through 2.2.25, 3.1 versions before 3.1.24, or 3.2 versions before 3.2.9 may be exposed. Exploitation additionally requires a directory under the served root that is a symbolic link.

2

What does an attacker need to exploit it?

An attacker can make an unauthenticated network request. They need a path that traverses through a symbolic link beneath the served root and then uses a dot-dot segment, causing the operating system to resolve outside the root.

3

Can this expose file contents outside the served root?

No. The disclosed information is limited to directory entry names, sizes, and modification times; Rack::Files normalizes paths before serving file contents.

4

What should be done if an upgrade cannot happen immediately?

Remove or avoid symbolic links within directories served by Rack::Directory, particularly where a request could follow the link with a dot-dot segment. Earlier Rack versions that reject every path containing dot-dot are not affected.

5

Which versions contain the fix?

Upgrade to Rack 2.2.26, 3.1.24, or 3.2.9.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203