Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 951161 (CVE-2025-27610) - <dev-ruby/rack-{2.2.12:2.2,3.0.14:3.0,3.1.12:3.1}: Local file inclusion in `Rack::Static`
Summary: <dev-ruby/rack-{2.2.12:2.2,3.0.14:3.0,3.1.12:3.1}: Local file inclusion in `R...
Status: CONFIRMED
Alias: CVE-2025-27610
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Security
URL: https://github.com/rack/rack/security...
Whiteboard: C3 [glsa?]
Keywords:
Depends on: 952029
Blocks:
  Show dependency tree
 
Reported: 2025-03-11 11:26 UTC by Hans de Graaff
Modified: 2025-03-28 13:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Graaff gentoo-dev Security 2025-03-11 11:26:46 UTC
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.

Affected versions
< 2.2.13
>= 3.0, < 3.0.14
>= 3.1, < 3.1.12

Patched versions
2.2.13
3.0.14
3.1.12
Comment 1 Larry the Git Cow gentoo-dev 2025-03-28 13:36:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdf6551acc2d23ac8a403e0af5ac0e01cf791d25

commit bdf6551acc2d23ac8a403e0af5ac0e01cf791d25
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2025-03-28 13:35:30 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2025-03-28 13:35:52 +0000

    dev-ruby/rack: drop 2.2.10, 3.0.10, 3.1.8
    
    Bug: https://bugs.gentoo.org/951161
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-ruby/rack/Manifest           |  3 ---
 dev-ruby/rack/rack-2.2.10.ebuild | 57 ----------------------------------------
 dev-ruby/rack/rack-3.0.10.ebuild | 45 -------------------------------
 dev-ruby/rack/rack-3.1.8.ebuild  | 45 -------------------------------
 4 files changed, 150 deletions(-)