CVE-2026-22860: Rack Directory Vulnerability
HIGHCVE-2026-22860 is a HIGH (CVSS 7.5) directory vulnerability (CWE-548: Exposure of Information Through Directory Listing) affecting Rack libraries in the RubyGems ecosystem. The issue involves directory. Remediation is available by upgrading affected packages to version 2.2.22, 3.1.20, 3.2.5.
CVE-2026-22860 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-22860
To remediate this vulnerability, upgrade all affected Rack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rack to 2.2.22
Upgrade rack to 3.1.20
Upgrade rack to 3.2.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-22860, inspect your project dependencies for Rack:
inspect dependencies for rack
Analyze the terminal output to locate any version of Rack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.22), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-548: Exposure of Information Through Directory Listing, where the product inappropriately exposes a directory listing with an index of all the resources located inside of the directory. In Rack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-22860 Affected Rack Versions
3 component(s)References
Frequently Asked Questions
What is CVE-2026-22860?
Which Rack versions are affected?
What version fixes CVE-2026-22860?
Is rack affected?
What is the CVSS score of CVE-2026-22860?
What CWE is associated with CVE-2026-22860?
How can I check RubyGems dependencies for CVE-2026-22860?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mxw3-3hh2-x2mh",
"modified" : "2026-02-24T16:06:28Z",
"published" : "2026-02-17T16:14:11Z",
"aliases" : [ "CVE-2026-22860" ],
"summary" : "Rack has a Directory Traversal via Rack:Directory",
"details" : "## Summary\n\n`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.\n\n## Details\n\nIn `directory.rb`, `File.expand_path(File.join(root, path_info)).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. \n\n## Impact\n\nInformation 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., `public2`, `www_backup`).\n\n## Mitigation\n\n* Update to a patched version of Rack that correctly checks the root prefix.\n* Don't name directories with the same prefix as one which is exposed via `Rack::Directory`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.22"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0.beta1"
}, {
"fixed" : "3.1.20"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"fixed" : "3.2.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rack/rack/security/advisories/GHSA-mxw3-3hh2-x2mh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22860"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/commit/75c5745c286637a8f049a33790c71237762069e7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rack/rack"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-22860.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-548" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-17T16:14:11Z",
"nvd_published_at" : "2026-02-18T19:21:43Z"
}
}