Node2Shell: A Brotli Decoder Flaw Can Crash, Leak Memory or Run Code in Node.js and Beyond
A flaw in Google's Brotli decoder, tracked as CVE-2026-111497, can let crafted compressed data crash a program, expose its memory or, in some setups, run attacker code. Google rates it critical (CVSS v4.0 9.2), while Node.js rates it high. Affected software includes Node.js, Python's Brotli packages, Bun, Envoy, .NET and other products that bundle the decoder.
The bug has several names. Imperva called the Node.js exposure Node2Shell, HTTP2Shell is a later name for the wider impact, and an independent tracking site uses Broccoli2Shell. All refer to the same CVE, so one patch covers them. Despite the names, this is not an HTTP/2 bug. Any attacker-controlled Brotli stream that reaches a vulnerable decoder can trigger it.
The problem lies in how the decoder handles an invalid block-type switch. The vulnerable code treated this format error the same as "not enough input yet", so it kept waiting for more data. As more arrived, it kept adding it to an eight-byte internal buffer and wrote past the end into neighbouring decoder state. Depending on what is overwritten, the result is a crash, memory disclosure or code execution. Imperva reached code execution on the official Node.js 24.22.0 Linux arm64 image, which took multiple attempts. It has not released an exploit, and public crash demonstrations are not the same as a reliable remote code execution exploit.
The fix was public in Brotli's source from February 27, but nothing marked it as a security fix and no release shipped it until October. Software built from release tarballs or older vendored copies stayed affected. Patched Node.js versions are 22.23.4, 24.22.1 and 26.12.1. The fixed decoder now returns a specific error and stops decoding. Updating, rebuilding and restarting is the remedy.
Why it matters
The fix sat in public source for months without a security label, so teams relying on advisories or release notes to trigger patching had no signal, and builds from older tarballs or vendored copies stayed exposed. Anyone who decodes Brotli from untrusted sources, such as web services, proxies or apps in Node.js, Python, Bun, Envoy or .NET, must now check bundled copies, not just the main runtime.
What to do
- Upgrade Node.js to 22.23.4, 24.22.1 or 26.12.1 or later.
- Update the Python Brotli and brotlicffi packages from PyPI to the fixed versions.
- Rebuild and restart services, including those with vendored or tarball-built Brotli copies.
- Identify where your software decodes Brotli data from attacker-influenced sources.