# CVE-2025-27610: Local File Inclusion in Rack::Static

> Attackers can read arbitrary files within the configured root directory via path traversal in Rack::Static, exposing sensitive data.

- **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:** 10 Mar 2025
- **Updated:** 3 Nov 2025
- **Also known as:** DEBIAN-CVE-2025-27610, GHSA-7wqh-767x-r66v, MINI-74rm-2684-5p55, MINI-7q28-xmc5-44jr, UBUNTU-CVE-2025-27610, openSUSE-SU-2025:14876-1

## What is CVE-2025-27610?

CVE-2025-27610 is a high-severity path traversal vulnerability in rack, published on 10 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Rack provides an interface for developing web applications in Ruby. Prior to versions 2.2.13, 3.0.14, and 3.1.12, `Rack::Static` can serve files under the specified `root:` even if `urls:` are provided, which may expose other files under the specified `root:` unexpectedly. The vulnerability occurs because `Rack::Static` does not properly sanitize user-supplied paths before serving files. Specifically, encoded path traversal sequences are not correctly validated, allowing attackers to access files outside the designated static file directory. By exploiting this vulnerability, an attacker can gain access to all files under the specified `root:` directory, provided they are able to determine then path of the file. Versions 2.2.13, 3.0.14, and 3.1.12 contain a patch for the issue. Other mitigations include removing usage of `Rack::Static`, or ensuring that `root:` points at a directory path which only contains files which should be accessed publicly. It is likely that a CDN or similar static file server would also mitigate the issue.

Weakness: CWE-23 (Relative Path Traversal)

## Which versions are affected by CVE-2025-27610?

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.13 |
| `rack` | RubyGems | All versions | 2.2.13 |
| `rack` | RubyGems | From 3.0 | 3.0.14 |
| `rack` | RubyGems | From 3.0 | 3.0.14 |
| `rack` | RubyGems | From 3.1 | 3.1.12 |
| `rack` | RubyGems | From 3.1 | 3.1.12 |
| `rubygem-rack-2.2` | openSUSE:Tumbleweed | All versions | 2.2.13-1.1 |

Products: Rack Rack.

## How do I fix CVE-2025-27610?

Upgrade rack to a fixed version for your release line: 2.2.13, 3.0.14 or 3.1.12.

## Is CVE-2025-27610 being exploited?

There is no known exploitation of CVE-2025-27610 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-2026-22860](https://insights.sbomify.com/CVE-2026-22860/): Rack has a Directory Traversal via Rack:Directory (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)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-27610 and fix it if it is affected.

What it is: CVE-2025-27610 is a high-severity path traversal vulnerability in rack, published on 10 Mar 2025. 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-2025-27610 in the wild and no public exploit code.

Affected packages and fixed versions:
- rack (RubyGems): affected all versions; fixed in 2.2.13
- rack (RubyGems): affected all versions; fixed in 2.2.13
- rack (RubyGems): affected from 3.0; fixed in 3.0.14
- rack (RubyGems): affected from 3.0; fixed in 3.0.14
- rack (RubyGems): affected from 3.1; fixed in 3.1.12
- rack (RubyGems): affected from 3.1; fixed in 3.1.12

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-2025-27610/ (Markdown: https://insights.sbomify.com/CVE-2025-27610/index.md)
```

## Sources

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

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