Vulnerabilities

CVE-2026-34831

Medium 6.5 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-04-02
Last modified
2026-07-24
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Scored by
nvd@nist.gov (NVD Primary)
Probability of exploitation
0.1 % higher than 4 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
rack (RubyGems) < 2.2.23 Affected
rack (RubyGems) ≥ 3.0.0.beta1, < 3.1.21 Affected
rack (RubyGems) ≥ 3.2.0, < 3.2.6 Affected
Rack Rack < 2.2.23 Affected
Rack Rack ≥ 3.0.0, < 3.1.21 Affected
Rack Rack ≥ 3.2.0, < 3.2.6 Affected

Weakness type

References

Related at Berigo

Articles

Services

  • CISO as a Service

    With CISO as a Service, an external CISO from Berigo leads your security work and reports to management and the board. You get security leadership wi…

  • Secure Post-Merger Integration

    Support for secure integration after acquisitions, mergers and carve-outs: from day-1 readiness to a consolidated ISMS and regulatory continuity.

  • ISO/IEC 27001: advisory and certification readiness

    ISO/IEC 27001 advisory and an information security management system that is used in practice and able to withstand a certification audit. Choose a g…

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities