CVE-2026-142592: Rack Denial of Service Vulnerability
HIGHCVE-2026-142592 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Rack libraries in the RubyGems ecosystem. The issue involves multipart parser searches the load path for every unknown part `charset`, allowing denial of service via cpu exhaustion. Remediation is available by upgrading affected packages to version 3.1.24, 3.2.9.
CVE-2026-142592 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-142592
To remediate this vulnerability, upgrade all affected Rack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rack to 3.1.24
Upgrade rack to 3.2.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-142592, inspect your project dependencies for Rack:
inspect dependencies for rack
Analyze the terminal output to locate any version of Rack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.24), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Rack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-142592 Affected Rack Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-142592?
Which Rack versions are affected?
What version fixes CVE-2026-142592?
Is rack affected?
What is the CVSS score of CVE-2026-142592?
What CWE is associated with CVE-2026-142592?
How can I check RubyGems dependencies for CVE-2026-142592?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-58mf-c3jj-277p",
"modified" : "2026-12-03T23:55:28Z",
"published" : "2026-12-03T23:55:28Z",
"aliases" : [ "CVE-2026-142592" ],
"summary" : "Rack: Multipart parser searches the load path for every unknown part `charset`, allowing denial of service via CPU exhaustion",
"details" : "## Summary\n\n`Rack::Multipart::Parser#tag_multipart_encoding` 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 `$LOAD_PATH` 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.\n\n## Details\n\nThe relevant code is:\n\n```ruby\nif k == \"charset\"\n encoding = find_encoding(v)\nend\n\ndef find_encoding(enc)\n Encoding.find enc\nrescue ArgumentError\n Encoding::BINARY\nend\n```\n\nFor a name absent from `Encoding.name_list`, `Encoding.find` calls `load_encoding` in `encoding.c`, which requires `enc/<name>.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 `$LOAD_PATH` entry: about 30 µs on a bare Ruby, about 500 µs in a Bundler application with 200 load-path entries on macOS, and about 2.5 ms per lookup measured on Linux with 167 entries.\n\nEach `;charset=x` costs 10 bytes. Existing limits do not bound the attack: the part limit (`RACK_MULTIPART_PART_LIMIT`, 4096) counts parts, not parameters; the 64 KiB part header limit is only enforced when a header spans two reads, so a single header of up to the 1 MiB buffer size is accepted; and part headers count toward the 16 MiB retained-size limit, which allows about 1.6 million lookups per request. A single part with 4000 unknown `charset` parameters (64 KB) takes about 1.7 s to parse in a mid-sized Bundler application; a 1 MB request with 16 such parts takes 27–40 s. Through Puma in a default Rails application, four concurrent 1 MB requests delayed an unrelated health-check endpoint by over 10 s. The result is binary regardless of how many unknown names appear, so none of the lookups beyond the first are useful.\n\nRack 3.0, 3.1 and 3.2 are affected. Rack 2.2 is not affected by the denial of service: it does not rescue the `ArgumentError`, so the first unknown `charset` aborts parsing after a single lookup.\n\n## Impact\n\nAny application that parses multipart bodies through `Rack::Request#POST` or `#params` is affected in its default configuration. In a default Rails application a POST to any path, including one with no route, is sufficient, because `Rack::MethodOverride` parses the body before routing. An unauthenticated attacker can occupy a worker thread for tens of seconds with a request under 1 MB, and for minutes with a larger one; concurrent requests exhaust the thread pool. The cost grows with the number of gems in the application's bundle. No authentication, malformed HTTP, or unusual configuration is required.\n\n## Mitigation\n\n* Update to a patched version of Rack, in which `Encoding.find` is only called for names present in `Encoding.name_list`, so unknown `charset` values are mapped to binary without searching the load path.\n* At a reverse proxy, limit the size of multipart requests and reject requests whose part headers contain many repeated `charset` parameters.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.24"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"fixed" : "3.2.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rack/rack/security/advisories/GHSA-58mf-c3jj-277p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-142592"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/commit/7c16c669fe2040ac395cf05a242f80527ddab16b"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/commit/8ae2ea868a13eec2cfa7065a1ea8b527c567fad9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rack/rack"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/releases/tag/v3.1.24"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/releases/tag/v3.2.9"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-03T23:55:28Z",
"nvd_published_at" : "2026-12-02T22:18:36Z"
}
}