{"id":"CVE-2026-120287","published":"2026-11-17T16:53:38Z","modified":"2026-11-20T05:55:56Z","title":"Multipart `:length` limit not charged for part and header framing in Plug.Parsers.MULTIPART","vendor":"elixir-plug","product":"plug","tier":"tail","description":{"text":"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.\n\nIn 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.\n\nThis issue affects plug: from 1.13.0 before 1.20.4.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.9,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0052,"percentile":0.45058,"provenance":"source"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"references":[{"url":"https://github.com/elixir-plug/plug/security/advisories/GHSA-qj4r-jh2r-rw3f","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-120287.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-120287","tags":["related"]},{"url":"https://github.com/elixir-plug/plug/commit/e06acbd3d381931f23cbde7d763136c9ccb091ac","tags":["related"]},{"url":"https://github.com/elixir-plug/plug/commit/3d3fb645323643935c6c94863c1b3edfd62e2828","tags":["patch"]},{"url":"https://github.com/elixir-plug/plug/commit/497913f2a6d744d693e98e96c5b9c6d88c265695","tags":["patch"]}],"priority":{"score":13.8,"factors":[{"name":"EPSS percentile","points":9.01},{"name":"CVSS severity","points":4.83}]},"vendorSlug":"elixir-plug","affectedVersions":[{"vendor":"elixir-plug","product":"plug","versions":[">= 1.13.0, < 1.20.4"]},{"vendor":"elixir-plug","product":"plug","versions":[">= e06acbd3d381931f23cbde7d763136c9ccb091ac"]}],"fixedVersions":[{"vendor":"elixir-plug","product":"plug","versions":["3d3fb645323643935c6c94863c1b3edfd62e2828","497913f2a6d744d693e98e96c5b9c6d88c265695"]}],"workarounds":{"items":["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."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-130","name":"One request makes the process that parses it hold many times the request size in memory until parsing completes, and concurrent requests add up. An application that accepts multipart requests from unauthenticated clients can run out of memory."}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-11-17T17:57:59.776542Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-127132","exploited":false,"provenance":"source"}}