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
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(-)