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.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
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
Which versions are affected by CVE-2025-27610?
6 open source packages ship an affected version, including rack. It affects 1 product.
| Package | 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 |
Linux distribution packages (1)
rubygem-rack-2.2 openSUSE:Tumbleweed | All versions | 2.2.13-1.1 |
Products include 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.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
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 Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching
- CVE-2026-34827 Rack: Algorithmic-Complexity DoS in Rack::Multipart::Parser
- CVE-2026-34829 Rack: Denial of Service via Unbounded Multipart File Upload Without Content-Length
- CVE-2026-22860 Rack has a Directory Traversal via Rack:Directory
- CVE-2025-61919 Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded body parsing
Sources
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.