{"cve":"CVE-2026-34831","nvd":{"published":"2026-04-02T17:16:26.420","modified":"2026-07-24T21:10:00.143","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5},"cwes":["CWE-130","CWE-135"],"references":["https://github.com/rack/rack/security/advisories/GHSA-q2ww-5357-x388"],"products":["rack:rack"],"source":"nvd","synced_at":"2026-10-19T22:28:18.033120106+00:00"},"epss":{"cve":"CVE-2026-34831","score":0.00152,"percentile":0.04376,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-q2ww-5357-x388","url":"https://osv.dev/vulnerability/GHSA-q2ww-5357-x388","summary":"Rack has Content-Length mismatch in Rack::Files error responses","modified":"2026-09-10T03:51:02.719242615Z","packages":[{"ecosystem":"RubyGems","name":"rack","purl":"pkg:gem/rack","ranges":["<2.2.23"],"fixed":["2.2.23"]},{"ecosystem":"RubyGems","name":"rack","purl":"pkg:gem/rack","ranges":[">=3.0.0.beta1 <3.1.21"],"fixed":["3.1.21"]},{"ecosystem":"RubyGems","name":"rack","purl":"pkg:gem/rack","ranges":[">=3.2.0 <3.2.6"],"fixed":["3.2.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}