RubySec

Providing security resources for the Ruby community

GHSA-5v64-555j-wjxm (rack): Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion.

Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion.

Published: October 30, 2026

SECURITY IDENTIFIERS

GEM

rack

SEVERITY

CVSS v3.x: 7.5 (High)

PATCHED VERSIONS

~> 2.2.25 ~> 3.1.23 >= 3.2.8

DESCRIPTION

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.

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.

RELATED