# CVE-2026-34785: Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 40% of CVEs (2026-12-01)
- Published: 2026-04-02T16:44:17.134Z
- Modified: 2026-09-10T03:51:01.819Z
- Also known as: GHSA-h2jq-g4cq-5ppq
- Weaknesses: CWE-187, CWE-200, CWE-552
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- rack rack: < 2.2.23; >= 3.0.0.beta1, < 3.1.21; >= 3.2.0, < 3.2.6; before 2.2.23; from 3.0.0 before 3.1.21; from 3.2.0 before 3.2.6
- rubygem-rack: no versions given
- rubygem-rack-test: no versions given
- satellite-capsule:el8/rubygem-rack: no versions given
- satellite:el8/rubygem-rack-test: no versions given
- rack (RubyGems): before 2.2.23; from 3.0.0.beta1 before 3.1.21; from 3.2.0 before 3.2.6

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- redhat-SADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/rack/rack/security/advisories/GHSA-h2jq-g4cq-5ppq> (vendor-advisory, web)
- <https://access.redhat.com/security/cve/CVE-2026-34785> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2454486> (issue-tracking)
- <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)

## Sources

- CVE List: [CVE-2026-34785](https://www.cve.org/CVERecord?id=CVE-2026-34785), CVE Terms of Use, modified 2026-07-15
- GitHub Advisory Database: [GHSA-h2jq-g4cq-5ppq](https://github.com/advisories/GHSA-h2jq-g4cq-5ppq), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-34785](https://nvd.nist.gov/vuln/detail/CVE-2026-34785), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-34785 · Whole record: https://cve.day/CVE-2026-34785.json · Rebuilt by cve.day 2026-11-25T22:59:17.809Z
