Codex Discovered a Hidden HTTP/2 Bomb
A denial-of-service attack against HTTP/2 servers combines a header compression bomb with a flow-control stall, so a single client can make a server allocate tens of gigabytes of memory and hold it. An attacker could render a vulnerable server inaccessible within seconds from an ordinary home connection.
blog.calif.io
Published on blog.calif.io
We’re publishing HTTP/2 Bomb, a remote denial-of-service exploit against most major web servers, including:
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the servers capped total decoded header size but not the number of header fields, and allowed a client to keep a stalled stream alive indefinitely with tiny window updates.
Impact
A single client could exhaust server memory and make the service unavailable; servers behind a CDN are much harder to bring down, and the authors note holding memory just under the kill threshold may be more effective than causing an out-of-memory crash.
What the attacker needed
Network access to an HTTP/2 server; server uses a vulnerable default config; no authentication needed
The fix
nginx added a max_headers directive and Apache made cookie headers count against its field limit; other affected servers had no patch at the time, so the advice was to disable HTTP/2 or cap header count and stalled-stream lifetime.
How it was found
- Seed the server's HPACK dynamic table with a single header entry.
- Send thousands of one-byte indexed references to that entry in one request.
- Split the Cookie header into many small crumbs to bypass header-count limits.
- Advertise a zero-byte flow-control window so the server cannot finish its response.
- Drip one-byte window-update frames to keep resetting the send timeout and pin the memory.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Web servers speak HTTP/2, which compresses repeated headers to save bandwidth. The attack sends a tiny header once, then refers to it thousands of times with one-byte pointers, so the server builds huge internal copies from very little traffic. It then tells the server to stop sending its reply, which keeps all that memory pinned until the server runs out and stops answering anyone.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.