# CVE-2026-22860: Rack has a Directory Traversal via Rack:Directory

> Attackers can escape the configured root directory to list files outside the intended scope via crafted requests in Rack::Directory.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Feb 2026
- **Updated:** 15 Jul 2026
- **Also known as:** CLEANSTART-2026-QD34337, CLEANSTART-2026-UK95444, DEBIAN-CVE-2026-22860, GHSA-mxw3-3hh2-x2mh, MINI-26gr-3rwv-v76j, MINI-2q5h-m77j-qrf4, MINI-3768-6mjw-x9h4, MINI-6c2m-5qhw-2fg4, MINI-6jfj-cpmh-7gq2, MINI-94c8-7p55-hj23, MINI-c8mm-xf39-j27j, MINI-chgw-4fvx-4f2m, MINI-cj4w-v9p8-p2mf, MINI-g275-q4vm-mvf3, MINI-h299-6rwg-76w7, MINI-hc3h-xwxj-5rgv, MINI-m7xv-g4vq-h5q8, MINI-mhmp-vrf2-6c8h, MINI-p537-2q79-597c, MINI-q2xw-4ghc-hjvr, MINI-qr4h-pf88-8645, MINI-qxr7-cxc5-4vvh, MINI-vfmp-59fq-c78p, MINI-x2cv-fv8h-mv2r, MINI-x2jr-q39x-hw6q, MINI-x3vj-859h-pmhr, UBUNTU-CVE-2026-22860

## What is CVE-2026-22860?

CVE-2026-22860 is a high-severity path traversal vulnerability in rack, published on 18 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Rack is a modular Ruby web server interface. Prior to versions 2.2.22, 3.1.20, and 3.2.5, `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. Versions 2.2.22, 3.1.20, and 3.2.5 fix the issue.

Weakness: CWE-548 (Exposure of Information Through Directory Listing), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-22860?

6 open source packages ship an affected version, including rack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rack` | RubyGems | All versions | 2.2.22 |
| `rack` | RubyGems | All versions | 2.2.22 |
| `rack` | RubyGems | From 3.0.0.beta1 | 3.1.20 |
| `rack` | RubyGems | From 3.0.0.beta1 | 3.1.20 |
| `rack` | RubyGems | From 3.2.0 | 3.2.5 |
| `rack` | RubyGems | From 3.2.0 | 3.2.5 |

Products: Rack Rack.

## How do I fix CVE-2026-22860?

Upgrade rack to a fixed version for your release line: 2.2.22, 3.1.20 or 3.2.5.

## Is CVE-2026-22860 being exploited?

There is no known exploitation of CVE-2026-22860 in the wild and no public exploit code.

## Other vulnerabilities in rack

- [CVE-2026-34785](https://insights.sbomify.com/CVE-2026-34785/): Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching (high 7.5)
- [CVE-2026-34827](https://insights.sbomify.com/CVE-2026-34827/): Rack: Algorithmic-Complexity DoS in Rack::Multipart::Parser (high 7.5)
- [CVE-2026-34829](https://insights.sbomify.com/CVE-2026-34829/): Rack: Denial of Service via Unbounded Multipart File Upload Without Content-Length (high 7.5)
- [CVE-2025-61919](https://insights.sbomify.com/CVE-2025-61919/): Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded body parsing (high 7.5)
- [CVE-2025-61770](https://insights.sbomify.com/CVE-2025-61770/): Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion) (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-22860 and fix it if it is affected.

What it is: CVE-2026-22860 is a high-severity path traversal vulnerability in rack, published on 18 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-22860 in the wild and no public exploit code.

Affected packages and fixed versions:
- rack (RubyGems): affected all versions; fixed in 2.2.22
- rack (RubyGems): affected all versions; fixed in 2.2.22
- rack (RubyGems): affected from 3.0.0.beta1; fixed in 3.1.20
- rack (RubyGems): affected from 3.0.0.beta1; fixed in 3.1.20
- rack (RubyGems): affected from 3.2.0; fixed in 3.2.5
- rack (RubyGems): affected from 3.2.0; fixed in 3.2.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-22860/ (Markdown: https://insights.sbomify.com/CVE-2026-22860/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-22860
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-22860
- OSV: https://osv.dev/vulnerability/CVE-2026-22860

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-22860/
Summaries are generated and may contain mistakes; the official description above is the record.
