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

- **Severity:** HIGH 8.7
- **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:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.66% (percentile 46, 2026-11-28)
- **CWE:** CWE-400
- **Aliases:** GHSA-5v64-555j-wjxm
- **Published:** 2026-11-10T19:35:49.000Z
- **Modified:** 2026-11-10T19:35:50.000Z

## Who should check

- Projects that depend on RubyGems package rack (\< 2.2.25)

## 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

- RubyGems `rack`: affected \< 2.2.25; fixed 2.2.25, 3.1.23, 3.2.8 (ghsa)

## Technologies

RubyGems

## Mitigation

- Upgrade rack to one of 2.2.25, 3.1.23, 3.2.8 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- vendor: <https://github.com/rack/rack/security/advisories/GHSA-5v64-555j-wjxm>
- patch: <https://github.com/rack/rack/commit/244e75a840cee0823f86d5d01dc374505a8abed8>
- patch: <https://github.com/rack/rack/commit/2eaa5b1026a03a43b6537b1a0b233707ba887702>
- patch: <https://github.com/rack/rack/commit/c9b4698595050838342bd3b5a0fc9ab908065f8f>
- other: <https://nvd.nist.gov/vuln/detail/CVE-2026-125111>
- other: <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-5v64-555j-wjxm.yml>
- other: <https://github.com/advisories/GHSA-5v64-555j-wjxm>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- GitHub Advisory Database: CC-BY 4.0 <https://github.com/advisories/GHSA-5v64-555j-wjxm> (license: <https://creativecommons.org/licenses/by/4.0/>)
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-125111> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-125111>
