{"api_version":"1","generated_at":"2026-11-17T18:37:25+00:00","cve":"CVE-2026-120287","urls":{"html":"https://cve.report/CVE-2026-120287","api":"https://cve.report/api/cve/CVE-2026-120287.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-120287","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-120287"},"summary":{"title":"Multipart `:length` limit not charged for part and header framing in Plug.Parsers.MULTIPART","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.\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.","state":"PUBLISHED","assigner":"EEF","published_at":"2026-11-17 17:17:53","updated_at":"2026-11-17 18:17:48"},"problem_types":["CWE-770","CWE-770 CWE-770 Allocation of Resources Without Limits or Throttling"],"metrics":[{"version":"4.0","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","score":"6.9","severity":"MEDIUM","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","data":{"version":"4.0","vectorString":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","baseScore":6.9,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}},{"version":"4.0","source":"CNA","type":"CVSS","score":"6.9","severity":"MEDIUM","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","data":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":6.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"}}],"references":[{"url":"https://github.com/elixir-plug/plug/commit/497913f2a6d744d693e98e96c5b9c6d88c265695","name":"https://github.com/elixir-plug/plug/commit/497913f2a6d744d693e98e96c5b9c6d88c265695","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/elixir-plug/plug/security/advisories/GHSA-qj4r-jh2r-rw3f","name":"https://github.com/elixir-plug/plug/security/advisories/GHSA-qj4r-jh2r-rw3f","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-120287","name":"https://osv.dev/vulnerability/EEF-CVE-2026-120287","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/elixir-plug/plug/commit/e06acbd3d381931f23cbde7d763136c9ccb091ac","name":"https://github.com/elixir-plug/plug/commit/e06acbd3d381931f23cbde7d763136c9ccb091ac","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://cna.erlef.org/cves/CVE-2026-120287.html","name":"https://cna.erlef.org/cves/CVE-2026-120287.html","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/elixir-plug/plug/commit/3d3fb645323643935c6c94863c1b3edfd62e2828","name":"https://github.com/elixir-plug/plug/commit/3d3fb645323643935c6c94863c1b3edfd62e2828","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-120287","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120287","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"elixir-plug","product":"plug","version":"affected 1.13.0 1.20.4 semver","platforms":[]},{"source":"CNA","vendor":"elixir-plug","product":"plug","version":"affected e06acbd3d381931f23cbde7d763136c9ccb091ac * git","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[{"source":"CNA","title":"","value":"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.","time":"","lang":"en"}],"exploits":[],"credits":[{"source":"CNA","value":"Neil Berkman / Xuku LLC","lang":"en"},{"source":"CNA","value":"Neil Berkman / Xuku LLC","lang":"en"},{"source":"CNA","value":"José Valim","lang":"en"},{"source":"CNA","value":"Jonatan Männchen / EEF","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2026-120287","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2026-11-17T17:57:59.776542Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-11-17T17:58:14.260Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:elixir-plug:plug:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Plug.Parsers.MULTIPART'"],"packageName":"plug","packageURL":"pkg:hex/plug","product":"plug","programFiles":["lib/plug/parsers/multipart.ex"],"programRoutines":[{"name":"'Elixir.Plug.Parsers.MULTIPART':parse/5"},{"name":"'Elixir.Plug.Parsers.MULTIPART':parse_multipart_headers/5"},{"name":"'Elixir.Plug.Parsers.MULTIPART':multipart_type/1"}],"repo":"https://github.com/elixir-plug/plug","vendor":"elixir-plug","versions":[{"lessThan":"1.20.4","status":"affected","version":"1.13.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:elixir-plug:plug:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Plug.Parsers.MULTIPART'"],"packageName":"elixir-plug/plug","packageURL":"pkg:github/elixir-plug/plug","product":"plug","programFiles":["lib/plug/parsers/multipart.ex"],"programRoutines":[{"name":"'Elixir.Plug.Parsers.MULTIPART':parse/5"},{"name":"'Elixir.Plug.Parsers.MULTIPART':parse_multipart_headers/5"},{"name":"'Elixir.Plug.Parsers.MULTIPART':multipart_type/1"}],"repo":"https://github.com/elixir-plug/plug","vendor":"elixir-plug","versions":[{"changes":[{"at":"497913f2a6d744d693e98e96c5b9c6d88c265695","status":"unaffected"},{"at":"3d3fb645323643935c6c94863c1b3edfd62e2828","status":"unaffected"}],"lessThan":"*","status":"affected","version":"e06acbd3d381931f23cbde7d763136c9ccb091ac","versionType":"git"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:elixir-plug:plug:*:*:*:*:*:*:*:*","versionEndExcluding":"1.20.4","versionStartIncluding":"1.13.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Neil Berkman / Xuku LLC"},{"lang":"en","type":"reporter","value":"Neil Berkman / Xuku LLC"},{"lang":"en","type":"remediation developer","value":"José Valim"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"}],"dateAssigned":"2026-11-17T03:24:00.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Allocation of Resources Without Limits or Throttling vulnerability in <code>Plug.Parsers.MULTIPART</code> 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 <code>:length</code> 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.</p>\n<p>In <code>lib/plug/parsers/multipart.ex</code>, <code>Plug.Parsers.MULTIPART.parse_multipart_headers/5</code> keeps an entry for every part without a <code>content-disposition</code> 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 <code>Plug.Parsers</code> with the <code>:multipart</code> parser is reachable.</p>\n<p>This issue affects plug: from 1.13.0 before 1.20.4.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}],"impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":6.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-770","description":"CWE-770 Allocation of Resources Without Limits or Throttling","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-17T16:53:38.533Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"name":"Plug.Parsers.MULTIPART does not charge all consumed multipart bytes against `:length`, allowing unbounded part accumulation and memory exhaustion","tags":["vendor-advisory","related"],"url":"https://github.com/elixir-plug/plug/security/advisories/GHSA-qj4r-jh2r-rw3f"},{"name":"EEF CNA record for CVE-2026-120287","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-120287.html"},{"name":"OSV record EEF-CVE-2026-120287","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-120287"},{"name":"Introducing commit e06acbd in elixir-plug/plug","tags":["related"],"url":"https://github.com/elixir-plug/plug/commit/e06acbd3d381931f23cbde7d763136c9ccb091ac"},{"name":"Fix commit 497913f in elixir-plug/plug","tags":["patch"],"url":"https://github.com/elixir-plug/plug/commit/497913f2a6d744d693e98e96c5b9c6d88c265695"},{"name":"Fix commit 3d3fb64 in elixir-plug/plug","tags":["patch"],"url":"https://github.com/elixir-plug/plug/commit/3d3fb645323643935c6c94863c1b3edfd62e2828"}],"source":{"discovery":"EXTERNAL"},"title":"Multipart `:length` limit not charged for part and header framing in Plug.Parsers.MULTIPART","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Limit the request body size in a reverse proxy in front of the application, for example with <code>client_max_body_size</code> 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 <code>:length</code> limit.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Build a multipart body with the boundary <code>b</code> that holds 500,001 parts without headers: the opening <code>--b\\r\\n\\r\\n</code>, then <code>\\r\\n--b\\r\\n\\r\\n</code> repeated 500,000 times, then <code>\\r\\n--b--\\r\\n</code>. The body is 4.5 MB.</li>\n<li>Create a connection with <code>Plug.Test.conn(:post, \"/\", body)</code> and the request header <code>content-type: multipart/form-data; boundary=b</code>.</li>\n<li>Call <code>Plug.Parsers.MULTIPART.parse/5</code> with the options from <code>Plug.Parsers.MULTIPART.init(length: 100_000)</code>.</li>\n<li>Observe that the call returns <code>{:ok, %{}, conn}</code> and not <code>{:error, :too_large, conn}</code>, and that the memory of the calling process rises to about 20 times the body size during the call.</li>\n<li>Repeat with 50 parts that each hold 30,000 header lines of <code>:\\r\\n</code>. The result is the same, with about 65 times the body size.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. Build a multipart body with the boundary `b` that holds 500,001 parts without headers: the opening `--b\\r\\n\\r\\n`, then `\\r\\n--b\\r\\n\\r\\n` repeated 500,000 times, then `\\r\\n--b--\\r\\n`. The body is 4.5 MB.\n2. Create a connection with `Plug.Test.conn(:post, \"/\", body)` and the request header `content-type: multipart/form-data; boundary=b`.\n3. Call `Plug.Parsers.MULTIPART.parse/5` with the options from `Plug.Parsers.MULTIPART.init(length: 100_000)`.\n4. Observe that the call returns `{:ok, %{}, conn}` and not `{:error, :too_large, conn}`, and that the memory of the calling process rises to about 20 times the body size during the call.\n5. Repeat with 50 parts that each hold 30,000 header lines of `:\\r\\n`. The result is the same, with about 65 times the body size."}],"value":"* Build a multipart body with the boundary b that holds 500,001 parts without headers: the opening --b\\r\\n\\r\\n, then \\r\\n--b\\r\\n\\r\\n repeated 500,000 times, then \\r\\n--b--\\r\\n. The body is 4.5 MB.\n* Create a connection with Plug.Test.conn(:post, \"/\", body) and the request header content-type: multipart/form-data; boundary=b.\n* Call Plug.Parsers.MULTIPART.parse/5 with the options from Plug.Parsers.MULTIPART.init(length: 100_000).\n* Observe that the call returns {:ok, %{}, conn} and not {:error, :too_large, conn}, and that the memory of the calling process rises to about 20 times the body size during the call.\n* Repeat with 50 parts that each hold 30,000 header lines of :\\r\\n. The result is the same, with about 65 times the body size."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. What the limit counts.</strong> <code>Plug.Parsers.MULTIPART.parse_multipart_headers/5</code> subtracts the result of <code>headers_size/1</code> from the remaining <code>:length</code> limit. <code>headers_size/1</code> sums <code>byte_size(key) + byte_size(value)</code> for each header. The part delimiter, the colon and CRLF of each header line, and the blank line that ends the header block are not counted.</p>\n<p><strong>2. Inputs that cost zero.</strong> A part without headers has an empty header list, so its charge is 0. A header line that holds only <code>:</code> followed by CRLF also costs 0, because <code>:plug_multipart.parse_hd_name/3</code> accepts the empty name and returns the header <code>{\"\", \"\"}</code>.</p>\n<p><strong>3. Retention.</strong> <code>multipart_type/1</code> returns <code>{:binary, nil}</code> for a part without a <code>content-disposition</code> header. The parser then prepends <code>{nil, headers, body}</code> to its accumulator for that part. <code>Plug.Parsers.MULTIPART.multipart_to_params/3</code> drops these entries, but only after the whole request body is read.</p>\n<p><strong>4. Limits that stay in effect.</strong> <code>Plug.Conn.read_part_headers/2</code> limits one header block to the smaller of <code>:length</code> and <code>:read_length</code>. No limit applies to the sum over all parts.</p>\n<p>On plug 1.20.3 with <code>length: 100_000</code>, a 4.5 MB body of 500,001 parts without headers parsed successfully with a peak of 92 MiB in the parser process. A 4.5 MB body of 50 parts with 30,000 <code>:</code> header lines each peaked at 283 MiB.</p>"},{"base64":false,"type":"text/markdown","value":"**1. What the limit counts.** `Plug.Parsers.MULTIPART.parse_multipart_headers/5` subtracts the result of `headers_size/1` from the remaining `:length` limit. `headers_size/1` sums `byte_size(key) + byte_size(value)` for each header. The part delimiter, the colon and CRLF of each header line, and the blank line that ends the header block are not counted.\n\n**2. Inputs that cost zero.** A part without headers has an empty header list, so its charge is 0. A header line that holds only `:` followed by CRLF also costs 0, because `:plug_multipart.parse_hd_name/3` accepts the empty name and returns the header `{\"\", \"\"}`.\n\n**3. Retention.** `multipart_type/1` returns `{:binary, nil}` for a part without a `content-disposition` header. The parser then prepends `{nil, headers, body}` to its accumulator for that part. `Plug.Parsers.MULTIPART.multipart_to_params/3` drops these entries, but only after the whole request body is read.\n\n**4. Limits that stay in effect.** `Plug.Conn.read_part_headers/2` limits one header block to the smaller of `:length` and `:read_length`. No limit applies to the sum over all parts.\n\nOn plug 1.20.3 with `length: 100_000`, a 4.5 MB body of 500,001 parts without headers parsed successfully with a peak of 92 MiB in the parser process. A 4.5 MB body of 50 parts with 30,000 `:` header lines each peaked at 283 MiB."}],"value":"1. What the limit counts. Plug.Parsers.MULTIPART.parse_multipart_headers/5 subtracts the result of headers_size/1 from the remaining :length limit. headers_size/1 sums byte_size(key) + byte_size(value) for each header. The part delimiter, the colon and CRLF of each header line, and the blank line that ends the header block are not counted.\n\n2. Inputs that cost zero. A part without headers has an empty header list, so its charge is 0. A header line that holds only : followed by CRLF also costs 0, because :plug_multipart.parse_hd_name/3 accepts the empty name and returns the header {\"\", \"\"}.\n\n3. Retention. multipart_type/1 returns {:binary, nil} for a part without a content-disposition header. The parser then prepends {nil, headers, body} to its accumulator for that part. Plug.Parsers.MULTIPART.multipart_to_params/3 drops these entries, but only after the whole request body is read.\n\n4. Limits that stay in effect. Plug.Conn.read_part_headers/2 limits one header block to the smaller of :length and :read_length. No limit applies to the sum over all parts.\n\nOn plug 1.20.3 with length: 100_000, a 4.5 MB body of 500,001 parts without headers parsed successfully with a peak of 92 MiB in the parser process. A 4.5 MB body of 50 parts with 30,000 : header lines each peaked at 283 MiB."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-120287","datePublished":"2026-11-17T16:53:38.533Z","dateReserved":"2026-11-17T03:12:34.331Z","dateUpdated":"2026-11-17T17:58:14.260Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-17 17:17:53","lastModifiedDate":"2026-11-17 18:17:48","problem_types":["CWE-770","CWE-770 CWE-770 Allocation of Resources Without Limits or Throttling"],"metrics":{"cvssMetricV40":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","cvssData":{"version":"4.0","vectorString":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","baseScore":6.9,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-11-17T17:57:59.776542Z","id":"CVE-2026-120287","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"120287","Ordinal":"1","Title":"Multipart `:length` limit not charged for part and header framin","CVE":"CVE-2026-120287","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"120287","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"Multipart `:length` limit not charged for part and header framin"}]}}}