NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · RubyGems

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

highCVSS 3.1 7.5GHSA-7wqh-767x-r66v

Summary Rack::Static can serve files under the specified root: even if urls: are provided, which may expose other files under the specified root: unexpectedly. Details The vulnerability occurs because Rack::Static does not properly sanitize user-supplied paths before serving files.

Published Mar 10, 2025 · Updated Nov 4, 2025

Affected packages

rack

Ecosystem
RubyGems
Affected
< 2.2.13
Fixed in
2.2.13
Check
bundle info rack

rack

Ecosystem
RubyGems
Affected
>= 3.0, < 3.0.14
Fixed in
3.0.14
Check
bundle info rack

rack

Ecosystem
RubyGems
Affected
>= 3.1, < 3.1.12
Fixed in
3.1.12
Check
bundle info rack

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Summary

Rack::Static can serve files under the specified root: even if urls: are provided, which may expose other files under the specified root: unexpectedly.

Details

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.

Impact

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.

Mitigation

  • Update to the latest version of Rack, or
  • Remove usage of Rack::Static, or
  • Ensure 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.

Credited to Masamuneee, jeremyevans, ioquatix.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More RubyGems vulnerabilities

All RubyGems entries