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

- Priority: **Prioritise**
- Reason: Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 2.2.23, 3.1.21, 3.2.6 (CNA); fix release not confirmed
- Status: published
- Published: 2026-04-02 · Modified: 2026-07-15
- Aliases: UBUNTU-CVE-2026-34785, DEBIAN-CVE-2026-34785, CGA-5537-cg4j-hpcw, CGA-7jpg-v37w-6g3f, CGA-93g4-j5j2-4wcc, CGA-cx78-f8r6-rgr5, CGA-f99w-6p68-jhwc, CGA-g7vf-hjgq-xwfp, CGA-hp49-4pfw-prxm, CGA-m266-fhc7-mm98, CGA-m989-836h-r966, CGA-mrjh-xp4x-45gv, CGA-r272-w89j-g628, CGA-r333-6p26-8rf2, CGA-rpr8-mpqq-w4pq, CGA-w5cp-7gjx-pr9r, CGA-w9xw-47vm-fpq6, CGA-wp92-cc4v-9g73, CGA-wvr6-hc84-vhqf, CGA-x5h6-cwmx-3r23, CGA-x98m-cmwf-j82g, CGA-xxp6-m277-m3gw, CGA-24v8-3r5q-8pcm, CGA-27cq-3x8q-hf6h, CGA-29rf-9m29-fxxw, CGA-2jwj-jf6g-mq77, CGA-2mx3-xxq4-fjmm, CGA-2px9-c8m9-682v, CGA-36ww-xg6x-mf9r, CGA-38q2-4j39-mjrw, CGA-3f6r-wff5-5gcr, CGA-3pv5-w4x9-p8w9, CGA-3r75-4gcr-p9q7, CGA-3wwf-qx52-5m83, CGA-467g-2m4w-hhvj, CGA-487p-mfqg-mv7p, CGA-4c9c-67c6-mp4h, CGA-4gwh-f5xw-w9cq, CGA-4p3m-3ffq-64gw, CGA-57j9-xm9p-v9jr, CGA-57m8-r3p9-2r9g, CGA-58hh-c38c-mxq5, CGA-5c6f-p47p-v4gw, CGA-5jj7-c742-xj39, CGA-5mwc-g8p6-rxq3, CGA-5vf5-jm9j-434h, CGA-6749-95h4-q8mx, CGA-694v-6377-4hr2, CGA-6c7r-g6rw-c924, CGA-6hxr-vc63-qw89, CGA-79m7-j45m-g5vq, CGA-7c5g-546v-gvv7, CGA-7ggf-5vqj-65wq, CGA-7pf2-89jm-h7c4, CGA-7rmc-wqpv-gfpm, CGA-8427-5jv6-wqr4, CGA-86jr-qj64-wcc9, CGA-88pp-47fj-gwc2, CGA-8f7r-9547-h39j, CGA-8q78-cg27-cp37, CGA-8wxr-p88q-jrxj, CGA-8xw2-xmc5-j5gv, CGA-9562-qr7r-26g8, CGA-97gh-mq2q-hgh4, CGA-98r5-3qxv-252h, CGA-9w29-j335-65h7, CGA-9wpm-46mr-mvwm, CGA-9wrc-qvrf-vv5r, CGA-c2jh-8fmx-vcgh, CGA-c685-ggc6-pr7p, CGA-c9qp-f8h9-hh46, CGA-cgf8-v63g-666v, CGA-cj4h-pxgm-6r5m, CGA-cmv8-44x4-2cgp, CGA-cxmh-2r4p-q92p, CGA-f2vv-r5h8-hf72, CGA-f3x2-fv5r-g699, CGA-fv3q-mrhf-qfp9, CGA-g24h-vc2p-3fj6, CGA-g34w-h77h-f4m4, CGA-ggw2-6vrq-q86j, CGA-gp4q-2mr4-8pjr, CGA-gw2p-92mm-2mqg, CGA-gwmp-8qh2-2cpm, CGA-h47j-h4pv-vfhj, CGA-h4f2-2prj-4qxg, CGA-h4jw-c8w2-f236, CGA-h6hg-3h3f-v2h6, CGA-j3q6-3m93-5h6h, CGA-j4p8-649r-cfpx, CGA-j4rx-hjjj-r44p, CGA-j5rc-95fv-mp6c, CGA-jcmr-75cp-387h, CGA-jqmm-62jj-3j98, CGA-jvh8-p99m-j453, CGA-m9gw-gjmj-2wmm, CGA-mrq2-vm35-93jc, CGA-p35c-69h3-rpj7, CGA-p659-3q7m-f2q6, CGA-pj8f-6929-9c58, GHSA-h2jq-g4cq-5ppq, CGA-q7w9-jww4-3gjg, CGA-q98p-vmx9-85q7, CGA-qc2x-q2rm-4757, CGA-qcp5-vc5c-3x3p, CGA-qq47-3f48-6j5f, CGA-r858-2252-7849, CGA-rch5-54q3-wr8h, CGA-rqmq-h8x2-22xw, CGA-v7r5-fvw2-hwx2, CGA-v8pj-p59p-cqv8, CGA-vc66-33xv-q79h, CGA-vmxr-8r79-7x4p, CGA-vqhr-568g-vq9r, CGA-vrh7-vpcr-3j5p, CGA-w63r-cgrm-4vff, CGA-wr66-hfv9-wvvh, CGA-x7j5-hf5v-gf8r, CGA-xg4v-6422-h8vc, CGA-xj8x-6557-5v8r, CGA-xr62-w2wp-5649
- Record: https://cvemate.com/vulnerability/CVE-2026-34785 · JSON: https://cvemate.com/vulnerability/CVE-2026-34785/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.444%, percentile 40.395%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 69)

- chainguard gitlab-exporter-18.10 (Chainguard): \< 18.10.3-r0
- chainguard gitlab-exporter-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-exporter-18.8 (Chainguard): \< 18.8.9-r0
- chainguard gitlab-exporter-18.9 (Chainguard): \< 18.9.5-r0
- chainguard gitlab-rails-ce-18.1 (Chainguard): \< 18.1.6-r13
- chainguard gitlab-rails-ce-18.10 (Chainguard): \< 18.10.4-r0
- chainguard gitlab-rails-ce-18.2 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.3 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.4 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.8 (Chainguard): \< 18.8.10-r0
- chainguard gitlab-rails-ce-18.9 (Chainguard): \< 18.9.6-r0
- chainguard gitlab-rails-ce-fips-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.10 (Chainguard): \< 18.10.4-r0
- chainguard gitlab-rails-ce-fips-18.2 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.3 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.4 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.5 (Chainguard): All versions (No fix recorded)

## References

- <https://github.com/rack/rack/security/advisories/GHSA-h2jq-g4cq-5ppq>
- <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://ubuntu.com/security/CVE-2026-34785>
- <https://www.cve.org/CVERecord?id=CVE-2026-34785>
- <https://ubuntu.com/security/notices/USN-8182-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-34785>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34785.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-34785>
- <https://github.com/rack/rack>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34785.yml>
- <https://ubuntu.com/security/notices/USN-8989-1>

---

Data as of 2026-12-05T07:37:53.595Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
