CVE-2026-34785
HIGH 7.5CVSS 3.1Rack::Static prefix matching can expose unintended files under the static root
Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Static determines whether a request should be served as a static file using a simple string prefix check. When configured with URL prefixes such as "/css", it matches any request path that begins with that string, including unrelated paths such as "/css-config.env" or "/css-backup.sql". As a result, files under the static root whose names merely share the configured prefix may be served unintentionally, leading to information disclosure. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.
- Published
- 2 Apr 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-187CWE-200CWE-552
- Also known as
- GHSA-h2jq-g4cq-5ppq
- Sources
- NVDJSONOSV GHSA-h2jq-g4cq-5ppqJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rack | rackcpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:* |
< 2.2.23 | 2.2.23 |
| NVD | rack | rackcpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:* |
>= 3.0.0, < 3.1.21 | 3.1.21 |
| NVD | rack | rackcpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:* |
>= 3.2.0, < 3.2.6 | 3.2.6 |
| OSV | RubyGems | rack | < 2.2.23 | 2.2.23 |
| OSV | RubyGems | rack | >= 3.0.0.beta1, < 3.1.21 | 3.1.21 |
| OSV | RubyGems | rack | >= 3.2.0, < 3.2.6 | 3.2.6 |
References
- https://github.com/rack/rack/security/advisories/GHSA-h2jq-g4cq-5ppq · Vendor Advisory, WEB
- https://access.redhat.com/security/cve/CVE-2026-34785
- https://bugzilla.redhat.com/show_bug.cgi?id=2454486
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34785.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-34785 · ADVISORY
- https://github.com/rack/rack · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34785.yml · WEB
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 2 Apr 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Apr 2026)