Advisory

GHSA-7wqh-767x-r66v

Also known as: CVE-2025-27610

Summary

Local File Inclusion in Rack::Static

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2025-03-10 22:19 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

rack

RubyGems · All systems

Affected

  • introduced 0, fixed 2.2.13 (ecosystem)

Fixed versions

2.2.13

Fix

The export has no generic command for this ecosystem.

rack

RubyGems · All systems

Affected

  • introduced 3.0, fixed 3.0.14 (ecosystem)

Fixed versions

3.0.14

Fix

The export has no generic command for this ecosystem.

rack

RubyGems · All systems

Affected

  • introduced 3.1, fixed 3.1.12 (ecosystem)

Fixed versions

3.1.12

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences