CVE-2026-120287Multipart `:length` limit not charged for part and header framing in…
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.
What to do
None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
What the vendor says
As published in the CVE record by EEF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- elixir-plug plug: affected: 1.13.0 to before 1.20.4; fixed in
1.20.4 - elixir-plug plug: affected: e06acbd3d381931f23cbde7d763136c9ccb091ac and later; fixed in
3d3fb645323643935c6c94863c1b3edfd62e2828,497913f2a6d744d693e98e96c5b9c6d88c265695
Workaround: 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.
Vendor advisories:
- https://github.com/elixir-plug/plug/security/advisories/GHSA-qj4r-jh2r-rw3f (vendor-advisory)
- https://github.com/elixir-plug/plug/commit/3d3fb645323643935c6c94863c1b3edfd62e2828 (patch)
- https://github.com/elixir-plug/plug/commit/497913f2a6d744d693e98e96c5b9c6d88c265695 (patch)
References
- https://github.com/elixir-plug/plug/security/advisories/GHSA-qj4r-jh2r-rw3f
- https://cna.erlef.org/cves/CVE-2026-120287.html
- https://osv.dev/vulnerability/EEF-CVE-2026-120287
- https://github.com/elixir-plug/plug/commit/e06acbd3d381931f23cbde7d763136c9ccb091ac
- https://github.com/elixir-plug/plug/commit/3d3fb645323643935c6c94863c1b3edfd62e2828
- https://github.com/elixir-plug/plug/commit/497913f2a6d744d693e98e96c5b9c6d88c265695
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.