HTTP/2 request bodies made of 1-byte DATA frames amplify memory use in Bandit
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 1.14.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Bandit, an Elixir web server that supports HTTP/2, is affected when an application reads request bodies, including any route that uses Plug.Parsers. An unauthenticated remote attacker sending request bodies split into many 1-byte HTTP/2 data frames across many concurrent streams can cause the server to consume large amounts of memory, potentially exhausting it.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Allocation of Resources Without Limits or Throttling vulnerability in the HTTP/2 request body reader of mtrudel bandit allows an unauthenticated remote attacker to exhaust server memory via a request body sent as many 1-byte DATA frames. do_read_data/5 in lib/bandit/http2/stream.ex keeps every DATA frame payload as its own list element until the read returns. The :length option of read_body/2 counts body bytes, not frames, so a body of 1-byte frames costs a list cell and a binary term per byte. Interleaving the frames across up to 500 concurrent streams per connection keeps each stream consuming its frames as they arrive; in the reporter's test, 100 streams held 25 to 40 MiB of stream process memory for 5 MB sent. Only routes whose Plug reads the request body are affected, which includes any route behind Plug.Parsers. This issue affects bandit: from 0.3.1 before 1.14.1.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- bandit
From 0.3.1 · fixed in 1.14.1
- mtrudel/bandit
Version range not reported