{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-34831","id":"CVE-2026-34831","title":"Rack: Content-Length mismatch in Rack::Files error responses","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 r","descriptionLong":"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.","published":"2026-04-02T16:43:08.762Z","updated":"2026-10-28T02:30:26.934149352Z","reserved":"2026-03-30T20:52:53.284Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":4.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["rack"],"affectedProducts":[{"vendor":"rack","product":"rack","defaultStatus":null,"versions":[{"version":"< 2.2.23","status":"affected"},{"version":">= 3.0.0.beta1, < 3.1.21","status":"affected"},{"version":">= 3.2.0, < 3.2.6","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"rack","purl":"pkg:gem/rack","ranges":["<2.2.23",">=3.0.0.beta1 <3.1.21",">=3.2.0 <3.2.6"],"fixed":["2.2.23","3.1.21","3.2.6"],"advisory":"GHSA-q2ww-5357-x388"}],"cwes":["CWE-130","CWE-135"],"aliases":["GHSA-q2ww-5357-x388"],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-q2ww-5357-x388","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34831.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34831","tags":["advisory"]},{"url":"https://github.com/rack/rack","tags":["package"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34831.yml","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00156,"epssPercentile":0.04824,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-34831","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34831","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-34831","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-q2ww-5357-x388","ok":true,"note":"GHSA-q2ww-5357-x388"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-34831","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}