Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-22860

Rack has a Directory Traversal via Rack:Directory
Back to all
CVE

CVE-2026-22860

Rack has a Directory Traversal via Rack:Directory

Summary

Rack::Directory’s path check used a string prefix match on the expanded path. A request like /../root_example/ can escape the configured root if the target path starts with the root string, allowing directory listing outside the intended root.

Details

In directory.rbFile.expandpath(File.join(root, pathinfo)).start_with?(root) does not enforce a path boundary. If the server root is /var/www/root, a path like /var/www/root_backup passes the check because it shares the same prefix, so Rack::Directory will list that directory also. 

Impact

Information disclosure via directory listing outside the configured root when Rack::Directory is exposed to untrusted clients and a directory shares the root prefix (e.g., public2www_backup).

Mitigation

  • Update to a patched version of Rack that correctly checks the root prefix.
  • Don't name directories with the same prefix as one which is exposed via Rack::Directory.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
C
H
U
-

Related Resources

No items found.

References

https://github.com/rack/rack/security/advisories/GHSA-mxw3-3hh2-x2mh, https://nvd.nist.gov/vuln/detail/CVE-2026-22860, https://github.com/rack/rack/commit/75c5745c286637a8f049a33790c71237762069e7, https://github.com/rack/rack, https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-22860.yml

Severity

7.5

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.5
EPSS Probability
0.001%
EPSS Percentile
0.277%
Introduced Version
0,3.0.0.beta1,3.2.0
Fix Available
2.2.22,3.1.20,3.2.5,18.6.6-r1,18.7.4-r1,18.8.4-r1,18.8.7-r0,18.9.3-r0,1.18.2-r60,8.17.10-r12,8.19.11-r1,9.0.8-r11,9.1.10-r1,9.2.5-r1,9.3.1-r1,7.1.6-r2,7.2.3-r2,8.0.4-r2,8.1.2-r1,2.2.22-r0,8.1.2-r2,7.1.6-r1,8.0.4-r1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading