CVE-2026-142592: Rack: Multipart parser searches the load path for every unknown part `charset`, allowing denial of service via CPU exhaustion.
Rack is a modular Ruby web server interface. From 3.0.0 until 3.1.24 and 3.2.9, Rack::Multipart::Parser#tagmultipartencoding calls Encoding.find for every charset parameter in a multipart part's Content-Type header without first checking Encoding.namelist. For an unknown name, Ruby searches each directory on $LOADPATH for an encoding library before raising ArgumentError, and Rack catches the exception without caching the failure or limiting repeated charset parameters. An unauthenticated attacker can send thousands of unknown charset parameters in a relatively small multipart request, occupying a worker thread for tens of seconds or longer, with cost increasing as the application's load path grows. Rack 2.2 is not affected by this denial of service because the first unknown charset aborts parsing. This issue is fixed in versions 3.1.24 and 3.2.9.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.1.24 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.2.9
Event History
Frequently Asked Questions
Which Rack deployments are affected?
Rack versions from 3.0.0 up to, but not including, 3.1.24 and 3.2.9 are affected. Rack 2.2 is not affected because parsing stops at the first unknown charset.
What must an attacker be able to do to exploit this issue?
An attacker only needs network access to submit a multipart request; authentication and user interaction are not required. The request can include thousands of multipart Content-Type charset parameters with unknown encoding names.
What makes the denial of service more severe in some applications?
Each unknown charset can cause Ruby to search every directory in the application's $LOAD_PATH for an encoding library. The CPU cost increases as the load path grows, and a relatively small request can occupy a worker thread for tens of seconds or longer.
What versions address the issue?
Upgrade to Rack 3.1.24 or Rack 3.2.9, depending on the supported release line.