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

High 7.5 Published Updated

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.

PackageAffectedFixed in
rack RubyGemsAll versions2.2.13
rack RubyGemsAll versions2.2.13
rack RubyGemsFrom 3.03.0.14
rack RubyGemsFrom 3.03.0.14
rack RubyGemsFrom 3.13.1.12
rack RubyGemsFrom 3.13.1.12
Linux distribution packages (1)
rubygem-rack-2.2 openSUSE:TumbleweedAll versions2.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.

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.

Is CVE-2025-27610 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free