Multipart `:length` limit not charged for part and header framing in Plug.Parsers.MULTIPART
- State
- Published
- Severity
- 6.9 Medium
- Published
- Nov 17, 2026
- Updated
- Nov 20, 2026
- Reserved
- Nov 17, 2026
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.
| Product | Versions |
|---|---|
| plug elixir-plug | 1.13.0 to before 1.20.4 Affected |
| plug elixir-plug | e06acbd3d381931f23cbde7d763136c9ccb091ac and later Affectedfrom 3d3fb645323643935c6c94863c1b3edfd62e2828 Not Affectedfrom 497913f2a6d744d693e98e96c5b9c6d88c265695 Not Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 6.9 Medium | EEF |
Weaknesses
- CWE-770 Allocation of Resources Without Limits or Throttling
References
- Plug.Parsers.MULTIPART does not charge all consumed multipart bytes against `:length`, allowing unbounded part accumulation and memory exhaustionVendor AdvisoryRelated
- EEF CNA record for CVE-2026-120287Related
- OSV record EEF-CVE-2026-120287Related
- Introducing commit e06acbd in elixir-plug/plugRelated
- Fix commit 3d3fb64 in elixir-plug/plugPatch
- Fix commit 497913f in elixir-plug/plugPatch
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.