CVE-2026-125111 — Vulnerability in rack — CVE Details
Rack: Multipart parsing allows DoS via unbounded scan buffer growth
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.66%). Schedule for your next planned update.
Does your project use an affected rack version?
Paste your Gemfile.lock to check it for CVE-2026-125111 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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_LIMITto the largest multipart body the application needs to accept, which bounds the memory a single request can hold.
Advisory Timeline
- First published November 10, 2026 (16 days ago).
- Last revised November 10, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install rack -v 2.2.25
gem install rack -v 3.1.23
gem install rack -v 3.2.8
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: RubyGems (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-400Uncontrolled Resource ConsumptionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/rack/rack/security/advisories/GHSA-5v64-555j-wjxmWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-125111ADVISORY
- https://github.com/rack/rack/commit/244e75a840cee0823f86d5d01dc374505a8abed8WEB
- https://github.com/rack/rack/commit/2eaa5b1026a03a43b6537b1a0b233707ba887702WEB
- https://github.com/rack/rack/commit/c9b4698595050838342bd3b5a0fc9ab908065f8fWEB
- https://github.com/rack/rackPACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-5v64-555j-wjxm.ymlWEB
Frequently Asked Questions
- What is CVE-2026-125111?
- Rack: Multipart parsing allows DoS via unbounded scan buffer growth. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2026-125111?
- CVE-2026-125111 affects rack. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-125111 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 46.3% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-46727HIGH
Rack has an Unbounded-Parameter DoS in Rack::QueryParser
- CVE-2026-34785HIGH
Rack::Static prefix matching can expose unintended files under the static root
- CVE-2018-16470HIGH
Rack vulnerable to Denial of Service
- CVE-2022-30122HIGH
Denial of Service Vulnerability in Rack Multipart Parsing
- CVE-2020-8184HIGH
Rack allows Percent-encoded cookies to overwrite existing prefixed cookie names
- CVE-2026-22860HIGH
Rack has a Directory Traversal via Rack:Directory
- CVE-2025-61770HIGH
Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion)
- CVE-2019-16782MEDIUM
Possible Information Leak / Session Hijack Vulnerability in Rack