Skip to main content
VulnerabilityPublished Updated

CVE-2026-34831: Ruby rack · Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Files#fail sets the Content-Length

Affects ruby-rackSource GCVE Database

0
Compare

Not known to be exploited · CVSS 6.5 Medium · fixed in 2.1.4-5ubuntu1.2+esm3 : update ruby-rack when convenient.

Data as of 3 Nov 2026, 23:21 UTC

CVSS 3.1 base score
6.5Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.1.4-5ubuntu1.2+esm3, 2.2.7-1ubuntu0.7, 3.1.16-0.1ubuntu0.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Nov 2026.

What to do

Upgrade the Ubuntu ruby-rack to 2.1.4-5ubuntu1.2+esm3 (package) or 2.2.7-1ubuntu0.7 (package) or 3.1.16-0.1ubuntu0.3 (package).

Affected software

ProductAffectedFixed in
Ubuntu 26.04 LTSruby-rackpkg:deb/ubuntu/ruby-rack?arch=source&distro=resoluteOther threatsAffected
  • 3.1.16-0.1 – 3.2.4-1ubuntu1.1
5 affected builds
Fixed in–
Ubuntu 25.10ruby-rackpkg:deb/ubuntu/ruby-rack?arch=source&distro=questingOther threatsAffected
  • <3.1.16-0.1ubuntu0.3
Fixed in
  • 3.1.16-0.1ubuntu0.3
Ubuntu 24.04 LTSruby-rackpkg:deb/ubuntu/ruby-rack?arch=source&distro=nobleOther threatsAffected
  • <2.2.7-1ubuntu0.7
Fixed in
  • 2.2.7-1ubuntu0.7
Ubuntu Pro 22.04 LTSruby-rackpkg:deb/ubuntu/ruby-rack?arch=source&distro=esm-apps/jammyOther threatsAffected
  • 2.1.4-5ubuntu1+esm2 – 2.1.4-5ubuntu1+esm5
  • <2.1.4-5ubuntu1.2+esm3
4 affected builds
Fixed in
  • 2.1.4-5ubuntu1.2+esm3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available and should be applied. The issue is fixed in Ruby Rack versions 2.2.23, 3.1.21, and 3.2.6. Ubuntu users can update to the fixed package versions as listed in the Ubuntu security advisory USN-8182-1. After updating, restart any applications using Rack to apply the fix. No additional mitigation steps are required beyond applying the official patches.

Description

A vulnerability in Ruby Rack prior to versions 2.2.23, 3.1.21, and 3.2.6 causes the Content-Length HTTP response header to be set incorrectly when the response body contains multibyte UTF-8 characters. This discrepancy can lead to HTTP response framing issues and potential response desynchronization in affected deployments. The issue arises because Rack::Files#fail uses String#size instead of String#bytesize to calculate Content-Length. This flaw has been patched in the specified versions.

References

Community reviews

Loading reviews…