Node2Shell Was Only the Beginning — The Brotli Flaw That Became HTTP2Shell
The evolution is straightforward once you understand the root cause: the bug is not in Node.js at all — it’s in Google’s Brotli C decoder library.
Node2Shell: the first discovery
Node.js bundles its own copy of Google’s Brotli decoder.
A malformed Brotli stream triggers an out‑of‑bounds write in the decoder.
Node.js automatically decompresses Brotli in:
Express 5 request bodies
body‑parser 2
fetch(), axios, got, SuperAgent responses
Result: a single malicious Brotli‑compressed request or response can crash Node.js, leak memory, or under certain conditions execute code.
This led to the name Node2Shell, coined by Imperva’s red team.
Researchers realize the bug is not Node-specific
The vulnerable code lives in Google Brotli versions 1.0.3–1.2.0, used widely across ecosystems.
Python packages such as:
brotli≤ 1.2.0brotlicffi≤ 1.2.0.2
are also vulnerable — and Python HTTP clients automatically decompress Brotli when these packages are installed:
requests
urllib3
httpx
aiohttp
Other affected environments include:
Bun
Envoy
C++ HTTP stacks
This dramatically widened the blast radius.
The name changes: HTTP2Shell
Once security teams saw that any HTTP stack that decompresses Brotli could be exploited, they began using the broader term HTTP2Shell.
Key points:
It is not a separate CVE — it is still CVE‑2026‑111497.
The name simply reflects that the bug affects HTTP clients, servers, proxies, gateways, not just Node.js.
Why “HTTP2Shell”?
The name does not refer to the HTTP/2 protocol.
It means: “From HTTP to a shell” — the attacker sends Brotli‑compressed HTTP data, and ends up with code execution.
All sources agree on the underlying flaw:
A malformed Brotli block switch is misinterpreted as “need more input” instead of an error.
The decoder continues writing past a small internal buffer → out‑of‑bounds write.
This enables memory corruption, crashes, data leakage, and potential RCE.
CVSS score: 9.2 (critical).
Node2Shell → HTTP2Shell happened because:
Node2Shell | Node.js is vulnerable because it ships Brotli internally. |
HTTP2Shell | Any HTTP stack that decompresses Brotli using vulnerable versions is vulnerable. |
This includes:
Node.js
Bun
Python HTTP clients
Python servers/middleware
Envoy
C++ HTTP stacks
Reverse proxies
API gateways
CDN-style services
The Patch Fix
Brotli 1.2.1 and brotlicffi 1.2.1.0 contain the fix.
Node.js fixed the issue in 22.23.4, 24.22.1, 26.12.1.
Bun fixed it in 1.4.4.
Node2Shell was just the beginning.
Once researchers realized the vulnerable Brotli decoder was embedded across the entire HTTP ecosystem, the name HTTP2Shell emerged to reflect the true scope: a cross‑language, cross‑platform RCE risk triggered by Brotli decompression anywhere in the HTTP pipeline.
.png)
Comments
Post a Comment