CVE-2026-125111
Rack: Multipart parsing allows DoS via unbounded scan buffer growth
Also known as GHSA-5v64-555j-wjxm
Mitigation
- Upgrade rack to one of 2.2.25, 3.1.23, 3.2.8 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package rack (< 2.2.25)
Vulnerability facts
- Affected
- rack < 2.2.25
- Fixed in
- 2.2.25, 3.1.23, 3.2.8
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.7 (v4.0, GitHub)CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: None
- Privileges required: None
- User interaction: None
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.66% chance of exploitation in 30 days (percentile 46, 2026-11-26)
- CWE
- CWE-400
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems rack | < 2.2.25 | 2.2.25, 3.1.23, 3.2.8 | ghsa |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-125111. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-125111.md Affected: rack < 2.2.25 Fixed in: 2.2.25, 3.1.23, 3.2.8 Steps: 1. Search this machine and project for rack (RubyGems): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Vendor advisories
Patches
FAQ
Is CVE-2026-125111 being exploited?
There is no confirmed exploitation: CVE-2026-125111 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.66% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-125111?
High: CVSS 8.7 (v4.0, scored by GitHub). Remote, no login needed.
Which versions are affected by CVE-2026-125111?
rack < 2.2.25.
Is there a fix for CVE-2026-125111?
Yes. Fixed in 2.2.25, 3.1.23, 3.2.8. Upgrade rack to one of 2.2.25, 3.1.23, 3.2.8 (or later in the same release line).
How do I check if I'm affected by CVE-2026-125111?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More rack vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| LOW 3.7 | CVE-2026-125108 Rack: Multipart boundary ambiguity guard in Rack::Multipart::Parser can be bypassed with a quoted boundary value, allowing WAF bypass | RubyGems | EPSS 24% | |
| MEDIUM 4.8 | CVE-2026-125109 Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835 | RubyGems | EPSS 21% | |
| MEDIUM 5.3 | CVE-2026-125110 Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch | RubyGems | EPSS 29% |