HIGH · CVSS 3.1 7.5 EPSS 0.7% · 46th percentile CWE-400

CVE-2026-125111: Rack: Multipart parsing allows DoS via unbounded scan buffer growth

Published 2026-11-10 · Updated 2026-11-10 · Also known as GHSA-5v64-555j-wjxm

Summary

Rack's multipart parser suffers from an unbounded scan buffer growth issue, allowing memory exhaustion via specifically crafted multipart requests. Users of the Rack library must update to the latest patched versions to prevent denial of service.

Who is affected

Applications using Rack to parse multipart requests are vulnerable in their default configuration. An unauthenticated attacker can trigger memory exhaustion by constructing requests with multipart boundaries precisely aligned with chunk sizes, forcing the internal buffer to grow proportionally to the total request size.

Exploitability

The vulnerability is rated as High severity with a base score of 7.5, reflecting that it is remotely exploitable without authentication or complex interaction. While the EPSS score is low at 0.004, the CISA KEV database confirms no evidence of active exploitation at this time.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
RubyGems rack >= 0, < 2.2.25 2.2.25 bundle update rack
RubyGems rack >= 3.0.0, < 3.1.23 3.1.23 bundle update rack
RubyGems rack >= 3.2.0, < 3.2.8 3.2.8 bundle update rack

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

FAQ

What specifically triggers the memory growth?

The memory growth occurs when multipart parts are sized and aligned such that chunk boundaries consistently fall within or immediately after part headers, preventing the parser from discarding parsed bytes.

Does this require special privileges to exploit?

No, the attack can be performed by an unauthenticated attacker sending a well-formed multipart request.

Are all file uploads dangerous?

Not necessarily; ordinary file uploads are constrained by existing file part limits, but the vulnerability allows attackers to bypass certain heap growth controls by carefully aligning multipart headers within the buffer.

Original advisory description
## Summary `Rack::Multipart::Parser` reads the request body in chunks of `rack.multipart.buffer_size` (1 MiB by default) into an internal scan buffer. Parsed bytes are only discarded from that buffer when a chunk ends inside a part body. A request whose parts are sized so that every chunk ends inside, or immediately after, a part's headers is never compacted, so the buffer grows to the size of the request. This results in a denial of service condition through memory exhaustion for applications that parse multipart requests. ## Details The parser appends each chunk read from the input to a `StringScanner` and advances through boundaries, headers, and bodies. In the body state, when no closing boundary is found, the consumed prefix is removed before more data is read. In the header state, and in the body state when no body bytes have been consumed yet, the parser requests more data without removing anything. Bytes skipped between parts are not counted against any limit. An attacker can therefore construct parts that each fit within one chunk and align the chunk boundaries with the part headers. The existing limits on buffered non-file field data, header size, and preamble size do not apply, because each individual part remains small. With default limits the buffer can reach roughly 4 GiB (4096 parts of about 1 MiB). Ordinary file uploads aligned the same way are bounded by the file part limit at roughly 128 MiB per request. ## Impact Any application that parses multipart requests with Rack is affected in its default configuration. An unauthenticated attacker can cause a single request to hold memory proportional to its size for the duration of parsing, exhausting worker memory. The attack requires only a well-formed multipart body. ## Mitigation * Update to a patched version of Rack in which the parser discards parsed bytes from its scan buffer before reading more data. * Limit the request body size at a reverse proxy or application boundary. * Set `RACK_MULTIPART_PARSER_BYTESIZE_LIMIT` to the largest multipart body the application needs to accept, which bounds the memory a single request can hold.

References

Source records: GHSA-5v64-555j-wjxm (OSV.dev) · EPSS by FIRST, 2026-11-26.