RubyGems
CVE-2026-125111
Rack: Multipart parsing allows DoS via unbounded scan buffer growth
- Severity
- High 7.5
- Published
- 10 Nov 2026
- Last changed
- 10 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.2.25, 3.1.23, 3.2.8
- Exploit chance
- 0.5% in the next 30 daysHigher than 43% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-5v64-555j-wjxm
- Sources
- OSV.dev and GitHub
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.
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.
Workarounds
- 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.
Affected software
| Software | Affected versions |
|---|---|
rackRubyGems · osv:RubyGems:rack |
|
About rack
- Total downloads (RubyGems)
- 1,398,166,843RubyGems, 24 Nov 2026
Vulnerabilities in rack
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-125108Rack: Multipart boundary ambiguity guard in Rack::Multipart::Parser can be bypassed with a quoted boundary value, allowing WAF bypassLow 3.7 10 Nov 2026
- CVE-2026-125109Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835Medium 4.8 10 Nov 2026
- CVE-2026-125110Rack: Rack::Static header_rules bypass via dot-segment normalization mismatchMedium 5.3 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-125111
- GitHub Advisory Database https://github.com/advisories/GHSA-5v64-555j-wjxm