VDB

CVE-2026-34831

CVE-2026-34831 PUBLISHED CVSS 4.8 MEDIUM

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

Reported by github_m · Published April 2, 2026

rack is fixed in 3.2.6, 3.1.21 and 2.2.23 (RubyGems)

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.

EPSS 0.16% · 4.7th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
rackRubyGems3.2.6, 3.1.21, 2.2.23
ruby3.3-rack-2.2Wolfi2.2.23-r0
kube-fluentd-operatorChainguard1.18.2-r67
gitlab-rails-ce-fips-18.9Chainguard18.9.6-r0
logstash-9.1Wolfi9.1.10-r6
logstash-9.2Chainguard9.2.8-r2
gitlab-cng-18.8Chainguard18.8.9-r0
pact-broker-dockerChainguard2.137.0.2.118.0-r4
gitlab-rails-ce-18.8Chainguard18.8.10-r0
gitlab-rails-ce-18.9Chainguard18.9.6-r0
ruby3.2-rails-7.2Chainguard7.2.3.1-r2, 7.2.3.1-r1
logstash-9.3Chainguard9.3.3-r2

14 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
4.8
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS Score
0.16%
4.7th percentile

Affected products

VendorProductVersions
rackrack< 2.2.23, >= 3.0.0.beta1, < 3.1.21, >= 3.2.0, < 3.2.6
rackrack3.2.0, >= 3.0.0.beta1, < 3.1.21

Timeline

  • Apr 2, 2026 CVE Published
  • Apr 2, 2026 CVE Updated
  • May 13, 2026 Security Advisory
  • May 18, 2026 EPSS Score (30 in total, the first dated here)
  • Jun 11, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-34831
vulnetix vdb fixes CVE-2026-34831

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-34831/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›