CVE-2026-120287
Medium 6.9No known exploitationFix availableMultipart `:length` limit not charged for part and header framing in Plug.Parsers.MULTIPART
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 45% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
Description
Allocation of Resources Without Limits or Throttling vulnerability in Plug.Parsers.MULTIPART in elixir-plug plug allows an unauthenticated remote attacker to exhaust memory via a multipart request body built from parts without headers, or from header lines without a name and a value. The parser charges the :length limit only with the name and value bytes of each part header and the bytes of each part body. The part delimiter, the header separator, and the line endings cost nothing. In lib/plug/parsers/multipart.ex, Plug.Parsers.MULTIPART.parse_multipart_headers/5 keeps an entry for every part without a content-disposition header, together with its header list, until the whole body is read. A request made of such parts does not reach the limit at any size, and the parser process holds a multiple of the request size in memory until parsing completes. Any endpoint that uses Plug.Parsers with the :multipart parser is reachable. This issue affects plug: from 1.13.0 before 1.20.4.
Weakness: CWE-770
Patching and mitigation
- Patch status
- Fix available (source: CVE record (EEF))
- Fix documented (source date)
- Mitigation
- Limit the request body size in a reverse proxy in front of the application, for example with client_max_body_size in nginx. The proxy rejects a larger body before it reaches the parser. This limits the memory that one request can hold but does not remove the multiplication: a body below the proxy limit still passes the :length limit. Source (opens in a new tab)
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| elixir-plug | plug | from 1.13.0 before 1.20.4 | 1.20.4 | CVE Program |
| elixir-plug | plug | e06acbd3d381931f23cbde7d763136c9ccb091ac | Not documented | CVE Program |
Timeline
Disclosure
CVE record published by EEF
Source: CVE Program (opens in a new tab)
Patch
Fix documented by CVE record (EEF)
Vendor guidance and references
- Fix commit 3d3fb64 in elixir-plug/plug (opens in a new tab)patch
- Fix commit 497913f in elixir-plug/plug (opens in a new tab)patch
- Plug.Parsers.MULTIPART does not charge all consumed multipart bytes against `:length`, allowing unbounded part accumulation and memory exhaustion (opens in a new tab)related, vendor-advisory
- EEF CNA record for CVE-2026-120287 (opens in a new tab)related
- Introducing commit e06acbd in elixir-plug/plug (opens in a new tab)related
- OSV record EEF-CVE-2026-120287 (opens in a new tab)related