# CVE-2026-34831: Rack: Content-Length mismatch in Rack::Files error responses

- Priority: **Routine**
- Reason: Not severe (CVSS 4.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-04-02 · Modified: 2026-04-03
- Aliases: UBUNTU-CVE-2026-34831, DEBIAN-CVE-2026-34831, CGA-23c4-c97c-75hc, CGA-2c39-jpv6-98xc, CGA-2qf8-57vx-jm5g, CGA-34r6-x97w-299p, CGA-4q2v-r6mv-qp3f, CGA-5v46-92fg-xfxh, CGA-6frm-62f3-q562, CGA-789j-35j4-2x4m, CGA-88h3-cw3q-6364, CGA-88x9-4vxr-3j6w, CGA-96pm-683f-8jcx, CGA-h8qp-v99p-qfj8, CGA-jjgc-325r-gcg2, CGA-jqxj-mxc4-pxxm, CGA-p4f5-pcpp-8fmv, CGA-pj76-cr3c-qrw8, CGA-qpjp-8wwf-6xgg, CGA-rmw3-58vv-w8cw, CGA-xhgj-qvc5-gcgj, CGA-xmgx-c3gp-x4qr, CGA-2gf3-w48q-9xcm, CGA-2x68-72gr-6crr, CGA-36ch-wxm2-4gh6, CGA-383q-62wx-647p, CGA-38cx-fc54-c452, CGA-39xc-c9qr-fq7g, CGA-3cpc-mm93-9457, CGA-3gv6-9h5m-w429, CGA-3jpp-6qvq-26x5, CGA-3x2p-6f4w-29r6, CGA-3x8c-7467-32pq, CGA-43rx-jfp7-538c, CGA-45c5-2c8c-qhrm, CGA-4cmw-m4hp-7hm5, CGA-4cq2-55rm-pxr7, CGA-4rq8-jccr-8rgv, CGA-4v7c-p3rw-9gr3, CGA-4ww9-rvh3-7xww, CGA-5453-qhxp-rphq, CGA-5fr5-w24q-69qp, CGA-625x-5mhg-rffh, CGA-668v-hrm6-v642, CGA-67jx-ggg5-482m, CGA-6fgf-v69x-9fjm, CGA-6rg4-qh89-ff9q, CGA-6rwj-r62r-5696, CGA-6vx2-7h87-hffv, CGA-6xr6-vww3-qjrg, CGA-76vq-4mhq-287r, CGA-7h6h-7qcp-pfx6, CGA-7hcw-w8w7-89jf, CGA-7pc7-66hh-cmh3, CGA-7x5j-w838-c6j4, CGA-89jf-w668-8vwq, CGA-8f3v-97q5-whw9, CGA-8h6j-q643-7rch, CGA-8hj9-pwf8-gg2q, CGA-8jm8-x2cg-hhcw, CGA-8vh2-q24v-qppw, CGA-943p-4rjc-h7r2, CGA-c4w4-pgch-xgff, CGA-c7w4-6j65-c53h, CGA-cf83-cvj4-qmwh, CGA-cmw2-gfhj-h2gg, CGA-cx74-pg9h-4m5g, CGA-f7c4-fmm8-5g8c, CGA-f7j5-99wq-f6vp, CGA-fw9r-2wm6-qx54, CGA-fwgx-5jxp-ppmc, CGA-g2hg-hhf3-783h, CGA-g7vv-58c4-w7xg, CGA-ggw2-pj85-2qrw, CGA-h2mj-46vf-v24c, CGA-h6c5-qrfw-4jwc, CGA-hhm3-rjx2-vq25, CGA-hjff-2473-xwrq, CGA-jhr2-r5hj-x3x2, CGA-jvrv-crhx-cr9m, CGA-jw73-8623-c4gr, CGA-m6cv-qq8w-3h25, CGA-m84r-2wcq-hcw8, CGA-m9hw-h88c-5344, CGA-m9m8-h2m8-gm4f, CGA-mg82-g84m-5mhh, CGA-mj4p-h3x2-grxg, CGA-mwhq-77hh-8p68, CGA-mwpj-wx85-4vh4, CGA-p2g4-664x-9hvg, CGA-p889-4f9x-x49p, CGA-p98q-8q79-m479, CGA-pmxg-p2v2-5647, CGA-pp76-pchx-fwx7, CGA-pr85-whhm-27j5, GHSA-q2ww-5357-x388, CGA-q3gq-j9r8-9h73, CGA-qr54-v7vj-q742, CGA-qrmc-xqj4-78m8, CGA-r5cm-78v7-r22m, CGA-r6gc-vpp4-pvhq, CGA-r9h5-p67p-cq3c, CGA-rfm7-f4jr-j2m3, CGA-rm5p-2fvw-w6cr, CGA-rqpj-4r3j-c7f5, CGA-rw9j-rhw5-f884, CGA-v4q2-3f9j-mp5c, CGA-v4xx-3c74-4pv3, CGA-v923-j9pq-p3r4, CGA-v9mh-5799-rr6g, CGA-vj88-2v9m-w4pc, CGA-vw92-p3jq-mw72, CGA-vwj3-86c8-7rg7, CGA-wfhq-95fc-qmxh, CGA-ww5q-7qwc-cxxm, CGA-x2wp-m4jj-95p9, CGA-x4rf-h423-63c9, CGA-x4w2-8x3w-wv65, CGA-xgpj-48vr-xj5r, CGA-xpg7-4gj6-jc35, CGA-xwrm-x2mc-w6hw
- Record: https://cvemate.com/vulnerability/CVE-2026-34831 · JSON: https://cvemate.com/vulnerability/CVE-2026-34831/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::Files#fail sets the Content-Length response header using String#size instead of String#bytesize. When the response body contains multibyte UTF-8 characters, the declared Content-Length is smaller than the number of bytes actually sent on the wire. Because Rack::Files reflects the requested path in 404 responses, an attacker can trigger this mismatch by requesting a non-existent path containing percent-encoded UTF-8 characters. This results in incorrect HTTP response framing and may cause response desynchronization in deployments that rely on the incorrect Content-Length value. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.
```

## Signals

- CVSS: 6.5 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- EPSS: 0.172%, percentile 6.852%, 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-q2ww-5357-x388>
- <https://ubuntu.com/security/CVE-2026-34831>
- <https://www.cve.org/CVERecord?id=CVE-2026-34831>
- <https://ubuntu.com/security/notices/USN-8182-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-34831>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34831.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-34831>
- <https://github.com/rack/rack>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34831.yml>
- <https://ubuntu.com/security/notices/USN-8989-1>

---

Data as of 2026-12-05T07:37:22.135Z. 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
