{"id":"CVE-2026-39803","state":"PUBLISHED","title":"HTTP/1 chunked body reader ignores length cap in bandit","description":"Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion.\n\nThe chunked clause of 'Elixir.Bandit.HTTP1.Socket':read_data/2 in lib/bandit/http1/socket.ex ignores the caller-supplied :length option when reading HTTP/1 chunked request bodies. Instead of capping the accumulated body at the configured limit (e.g. Plug.Parsers' default 8 MB), do_read_chunked_data!/5 buffers every received chunk into an iolist unconditionally and materializes the entire body as a single binary. The function always returns {:ok, body, ...}, so callers cannot interpose a 413 response.\n\nBecause Plug.Parsers runs before routing and authentication in the standard Phoenix endpoint, an unauthenticated attacker needs no valid route or credentials. Sending a single Transfer-Encoding: chunked POST request with an arbitrarily large body to any path causes the BEAM process to exhaust available memory and be terminated by the OS OOM killer.\n\nThe content-length path in the same function correctly enforces the limit and is not affected.\n\nThis issue affects bandit: from 1.4.0 before 1.11.1.","publishedAt":"2026-05-13T13:36:09.648Z","updatedAt":"2026-05-27T15:40:37.538Z","severity":{"score":8.7,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","source":"EEF"},"assigner":"EEF","products":["mtrudel bandit"],"affected":[{"vendor":"mtrudel","product":"bandit","packageName":"bandit","packageURL":"pkg:hex/bandit","defaultStatus":"unaffected","versions":[{"version":"1.4.0","status":"affected","lessThan":"1.11.1","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Bandit.HTTP1.Socket'"],"programFiles":["lib/bandit/http1/socket.ex"],"programRoutines":[{"name":"'Elixir.Bandit.HTTP1.Socket':read_data/2"},{"name":"'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5"}],"repo":"https://github.com/mtrudel/bandit"},{"vendor":"mtrudel","product":"bandit","packageName":"mtrudel/bandit","packageURL":"pkg:github/mtrudel/bandit","defaultStatus":"unaffected","versions":[{"version":"903e209a521bc216b9f9065c01ae9a0cac2d5a10","status":"affected","lessThan":"ae3520dfdbfab115c638f8c7f6f6b805db34e1ab","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Bandit.HTTP1.Socket'"],"programFiles":["lib/bandit/http1/socket.ex"],"programRoutines":[{"name":"'Elixir.Bandit.HTTP1.Socket':read_data/2"},{"name":"'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5"}],"repo":"https://github.com/mtrudel/bandit"}],"references":["https://github.com/mtrudel/bandit/security/advisories/GHSA-9q9q-324x-93r2","https://cna.erlef.org/cves/CVE-2026-39803.html","https://osv.dev/vulnerability/EEF-CVE-2026-39803","https://github.com/mtrudel/bandit/commit/ae3520dfdbfab115c638f8c7f6f6b805db34e1ab"],"weaknesses":["CWE-770"],"ingestedAt":"2026-10-29T20:11:50.837Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/39xxx/CVE-2026-39803.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-39803","state":"PUBLISHED","datePublished":"2026-05-13T13:36:09.648Z","dateUpdated":"2026-05-27T15:40:37.538Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-04-07T12:28:54.916Z"},"containers":{"cna":{"title":"HTTP/1 chunked body reader ignores length cap in bandit","descriptions":[{"lang":"en","value":"Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion.\n\nThe chunked clause of 'Elixir.Bandit.HTTP1.Socket':read_data/2 in lib/bandit/http1/socket.ex ignores the caller-supplied :length option when reading HTTP/1 chunked request bodies. Instead of capping the accumulated body at the configured limit (e.g. Plug.Parsers' default 8 MB), do_read_chunked_data!/5 buffers every received chunk into an iolist unconditionally and materializes the entire body as a single binary. The function always returns {:ok, body, ...}, so callers cannot interpose a 413 response.\n\nBecause Plug.Parsers runs before routing and authentication in the standard Phoenix endpoint, an unauthenticated attacker needs no valid route or credentials. Sending a single Transfer-Encoding: chunked POST request with an arbitrarily large body to any path causes the BEAM process to exhaust available memory and be terminated by the OS OOM killer.\n\nThe content-length path in the same function correctly enforces the limit and is not affected.\n\nThis issue affects bandit: from 1.4.0 before 1.11.1."}],"affected":[{"vendor":"mtrudel","product":"bandit","packageName":"bandit","packageURL":"pkg:hex/bandit","defaultStatus":"unaffected","versions":[{"version":"1.4.0","status":"affected","lessThan":"1.11.1","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Bandit.HTTP1.Socket'"],"programFiles":["lib/bandit/http1/socket.ex"],"programRoutines":[{"name":"'Elixir.Bandit.HTTP1.Socket':read_data/2"},{"name":"'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5"}],"repo":"https://github.com/mtrudel/bandit"},{"vendor":"mtrudel","product":"bandit","packageName":"mtrudel/bandit","packageURL":"pkg:github/mtrudel/bandit","defaultStatus":"unaffected","versions":[{"version":"903e209a521bc216b9f9065c01ae9a0cac2d5a10","status":"affected","lessThan":"ae3520dfdbfab115c638f8c7f6f6b805db34e1ab","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Bandit.HTTP1.Socket'"],"programFiles":["lib/bandit/http1/socket.ex"],"programRoutines":[{"name":"'Elixir.Bandit.HTTP1.Socket':read_data/2"},{"name":"'Elixir.Bandit.HTTP1.Socket':do_read_chunked_data!/5"}],"repo":"https://github.com/mtrudel/bandit"}],"references":[{"url":"https://github.com/mtrudel/bandit/security/advisories/GHSA-9q9q-324x-93r2","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-39803.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-39803","tags":["related"]},{"url":"https://github.com/mtrudel/bandit/commit/ae3520dfdbfab115c638f8c7f6f6b805db34e1ab","tags":["patch"]}],"metrics":[{"cvssV4_0":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":8.7,"baseSeverity":"HIGH","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE"},"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":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-05-27T15:40:37.538Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*","versionEndExcluding":"1.11.1","versionStartIncluding":"1.4.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Mat Trudel"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","value":"CAPEC-130 Excessive Allocation"}]}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/mtrudel/bandit/security/advisories/GHSA-9q9q-324x-93r2","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-13T14:41:58.440838Z","id":"CVE-2026-39803","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-13T14:43:25.158Z"}}]}}}