Rack: Multipart parser searches the load path for every unknown part `charset`, allowing denial of service via CPU exhaustion
CVE-2026-142592
Summary Rack::Multipart::Parser#tagmultipartencoding calls Encoding.find once for every charset parameter in the Content-Type header of a multipart part. When the name is not a known encoding, Ruby's Encoding.find attempts to load an encoding library of that name, which searches every directory on $LOADPATH before failing. Rack rescues the resulting ArgumentError and falls back to binary, does not remember the failure, and does not limit the number of charset parameters a part may carry. An attacker can send a part whose Content-Type contains thousands of unknown charset parameters, and each one costs a full load-path search. This results in a denial of service condition for applications that accept multipart requests. Details The relevant code is: ruby if k == "charset" encoding = findencoding(v) end def findencoding(enc) Encoding.find enc rescue ArgumentError Encoding::BINARY end For a name absent from Encoding.namelist, Encoding.find calls loadencoding in encoding.c, which requires enc/ .so through Ruby's internal loader. The lookup is not cached, is not visible to RubyGems or Bootsnap, and costs roughly 3–5 µs per $LOADPATH entry: about 30 µs on a bare Ruby, about 500 µs in a…
Assessment
- CVSS
- 7.5 (v3.1)
- Severity
- High
- EPSS
- 0% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 3 December 2026
- Last updated
- 3 December 2026
- Weakness
- CWE-400
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
At the source
References
- https://github.com/rack/rack/security/advisories/GHSA-58mf-c3jj-277p
- https://nvd.nist.gov/vuln/detail/CVE-2026-142592
- https://github.com/rack/rack/commit/7c16c669fe2040ac395cf05a242f80527ddab16b
- https://github.com/rack/rack/commit/8ae2ea868a13eec2cfa7065a1ea8b527c567fad9
- https://github.com/rack/rack/releases/tag/v3.1.24
- https://github.com/rack/rack/releases/tag/v3.2.9
- https://github.com/advisories/GHSA-58mf-c3jj-277p
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-142592