CVE-2025-27610
Local File Inclusion in Rack::Static
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
A flaw was found in RackRubygems, where 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. This flaw allows an attacker to gain access to all files under the specified root directory, provided they can determine the file's path.
Nhật Thái Đỗ discovered that Rack incorrectly handled certain usernames. A remote attacker could possibly use this issue to perform CRLF injection. Phạm Quang Minh discovered that Rack incorrectly handled certain headers. A remote attacker could possibly use this issue to perform log injection. Phạm Quang Minh discovered that Rack did not properly handle relative file paths. A remote attacker could potentially exploit this to include local files that should have been inaccessible.
CVSS Scores
SSVC
- Decision:Attend
Timeline
- 2025-03-03 CVE Reserved
- 2025-03-10 CVE Published
- 2025-03-11 CVE Updated
- 2025-03-30 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-23: Relative Path Traversal
CAPEC
References (4)
URL | Tag | Source |
---|---|---|
https://github.com/rack/rack/commit/50caab74fa01ee8f5dbdee7bb2782126d20c6583 | X_refsource_misc | |
https://github.com/rack/rack/security/advisories/GHSA-7wqh-767x-r66v | X_refsource_confirm |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2025-27610 | 2025-04-01 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2351231 | 2025-04-01 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Rack Search vendor "Rack" | Rack Search vendor "Rack" for product "Rack" | < 2.2.13 Search vendor "Rack" for product "Rack" and version " < 2.2.13" | en |
Affected
| ||||||
Rack Search vendor "Rack" | Rack Search vendor "Rack" for product "Rack" | >= 3.0.0 < 3.0.14 Search vendor "Rack" for product "Rack" and version " >= 3.0.0 < 3.0.14" | en |
Affected
| ||||||
Rack Search vendor "Rack" | Rack Search vendor "Rack" for product "Rack" | >= 3.1.0 < 3.1.12 Search vendor "Rack" for product "Rack" and version " >= 3.1.0 < 3.1.12" | en |
Affected
|