CVE-2026-34831

Rack: Content-Length mismatch in Rack::Files error responses

MEDIUM
6.5
CVSS Score
Published: April 2, 2026 at 04:43 PM UTC
Updated: July 24, 2026 at 09:20 PM UTC
1 product affected across 1 vendorRack

Using rack by rack?

Get instant alerts when new vulnerabilities affect rack - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 0.1%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

Rack· Rackrubygems
95%
v < 2.2.23v < 3.1.21v < 3.2.63.0.0 ≤ v < 3.1.213.2.0 ≤ v < 3.2.6
Affected range stops below 2.2.23, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.1.21, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.2.6, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (1)

x_refsource_CONFIRMVendor Advisory
Source: cverecord
https://github.com/rack/rack/security/advisories/GHSA-q2ww-5357-x388

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-130CWE-135

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card