BREW-MAILCATCHER-CVE-202… (GHSA-5V64-555J-WJXM)
Vulnerability from osv_homebrew – Published: 2026-11-11 09:07 – Updated: 2026-11-11 09:07 – Source websiteSummary
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.
{
"affected": [
{
"ecosystem_specific": {
"fix": null,
"range_state": "affected",
"resource": "rack",
"resource_purl": "pkg:gem/rack@3.2.7",
"upstream_fixed_in": "3.2.8"
},
"package": {
"ecosystem": "Homebrew",
"name": "mailcatcher",
"purl": "pkg:brew/mailcatcher"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "RubyGems",
"key": "pkg:gem/rack@3.2.7",
"name": "rack",
"resource": "rack",
"strategy": "registry",
"subject_version": "3.2.7"
}
]
},
"details": "## Summary\n\n`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\u0027s headers is never compacted, so the buffer grows to the size of the request.\n\nThis results in a denial of service condition through memory exhaustion for applications that parse multipart requests.\n\n## Details\n\nThe 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.\n\nAn 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.\n\n## Impact\n\nAny 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.\n\n## Mitigation\n\n* Update to a patched version of Rack in which the parser discards parsed bytes from its scan buffer before reading more data.\n* Limit the request body size at a reverse proxy or application boundary.\n* 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.",
"id": "BREW-mailcatcher-CVE-2026-125111",
"modified": "2026-11-11T09:07:56Z",
"published": "2026-11-11T09:07:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/rack/rack/security/advisories/GHSA-5v64-555j-wjxm"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125111"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/commit/244e75a840cee0823f86d5d01dc374505a8abed8"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/commit/2eaa5b1026a03a43b6537b1a0b233707ba887702"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/commit/c9b4698595050838342bd3b5a0fc9ab908065f8f"
},
{
"type": "PACKAGE",
"url": "https://github.com/rack/rack"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-5v64-555j-wjxm.yml"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "Rack: Multipart parsing allows DoS via unbounded scan buffer growth",
"upstream": [
"GHSA-5v64-555j-wjxm",
"CVE-2026-125111"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.