CVE-2026-34831 json
Rack: Content-Length mismatch in Rack::Files error responses
published 2026-04-02 7 mo ago modified 2026-09-10 1 mo ago also EUVD-2026-18392 , GHSA-q2ww-5357-x388
- cvss
- 4.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 4%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems rack 2.2.23, 3.1.21, 3.2.6
- rack rack 2.2.23, 3.1.21, 3.2.6
- rack_project rack 2.2.23, 3.1.21, 3.2.6
- ruby-rack Debian 12 2.2.22-0+deb12u2
- ruby-rack Debian 13 3.1.20-0+deb13u2
- ruby-rack Debian 14 3.2.6-2
debian advisories DEBIAN-CVE-2026-34831
- ruby-rack Ubuntu 24.04 LTS 2.2.7-1ubuntu0.7
- ruby-rack Ubuntu 25.10 3.1.16-0.1ubuntu0.3
- ruby-rack Ubuntu 26.04 LTS 3.2.4-1ubuntu1.1
- ruby-rack Ubuntu Pro 22.04 LTS 2.1.4-5ubuntu1.2+esm3
ubuntu advisories UBUNTU-CVE-2026-34831
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rmt-server SLES for SAP applications 16.0, SLES 16.0 3.1.0-160000.1.1
- rmt-server SLES for SAP 15 SP6, SLES for SAP 15 SP5, SLES 15 SP6-LTSS +5 more 2.27-150500.3.47.1
suse advisories SUSE-SU-2026:23321-1SUSE-SU-2026:2487-1
- rmt-server openSUSE Leap 16.0 3.1.0-160000.1.1
- rubygem-rack-2.2 openSUSE Tumbleweed 2.2.23-1.1
opensuse advisories openSUSE-SU-2026:21640-1openSUSE-SU-2026:10508-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-34831 updated cvss 4.8
rack: Rack: HTTP response desynchronization via incorrect Content-Length calculation with UTF-8 characters
-
Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/vector-rhel9, openshift-logging/fluentd-rhel9, openshift-logging/eventrouter-rhel9, openshift-logging/logging-view-plugin-rhel9, openshift-logging/cluster-logging-rhel9-operator, openshift-logging/log-file-metric-exporter-rhel9, +1 more Red Hat 3scale API Management Platform 2 3scale-amp21/zync, 3scale-amp22/zync, 3scale-amp24/zync, 3scale-amp25/zync, 3scale-amp26/zync, 3scale-amp20/system, +19 more Red Hat Enterprise Linux 7 pcs, pcs-snmp, python-clufter Red Hat Enterprise Linux 8 pcs, pcs-snmp Red Hat Enterprise Linux 9 pcs, pcs-snmp, ubi9/ruby-30, ubi9/ruby-33, rhel9/ruby-30, rhel9/ruby-33 Red Hat Enterprise Linux 10 pcsaffected: workaround, no fix available “Fix deferred”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 7 mo ago
Exploit prediction
0.15% chance of exploitation in the next 30 days, higher than 4% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| GitHub | 3.1 | 4.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | rack | <2.2.23 >=3.0.0.beta1, <3.1.21 >=3.2.0, <3.2.6 |
2.2.23 3.1.21 3.2.6 |
Affected products
- rack rack
Classification
References
Sources
- CVE List CVE-2026-34831
- GitHub Advisory GHSA-q2ww-5357-x388
- NVD CVE-2026-34831
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.