Node2Shell CVE-2026-111497: Brotli Decoder Flaw Affects Multiple Runtimes

Summary
Datadog Security Labs reproduces CVE-2026-111497, an out-of-bounds write in Google’s Brotli decoder affecting Node.js and other runtimes. The article details exploitation paths, detection limits, and patches, which it identifies as the only complete fix.
Key points
- The article describes CVE-2026-111497 as an out-of-bounds write in the Brotli decoder, with a CVSS v4.0 score of 9.2; Node.js rates it High.
- The flaw is in the upstream Google Brotli C library and also affects Python Brotli, Bun, Java brotli4j, .NET, Envoy, and Istio.
- Datadog Security Labs reproduced the issue on the official Node.js 24.22.0 image. A crafted stream can cause an unchecked write into decoder state or loop indefinitely, pinning a CPU core.
- Brotli decoding can expose services through inbound compressed request bodies and outbound clients that automatically decompress responses. The article says a WAF cannot inspect the malicious compressed content.
- The article reports confirmed in-the-wild exploitation as of October 29, 2026. It also says Imperva demonstrated code execution after several attempts; the public proof of concept produced a crash and limited memory read on standard builds.
- Fixed Node.js releases are 22.23.4, 24.22.1, and 26.12.1. The article lists fixes for other affected Brotli consumers too; disabling request-body inflation or rejecting Brotli is only a partial mitigation.
- The article recommends behavioral detection, including decoder errors, crashes, sustained CPU use, unexpected decompressed output, or shells and new outbound connections from a workload.
Article Details
- Attack Vectors
- An attacker can send a crafted Brotli-compressed request body to an exposed service that decompresses request bodies, including Express 5 and body-parser 2.x parsers; parsers mounted before authentication may expose the decoder to unauthenticated requests.
- An attacker can influence a URL fetched by an application and return a Brotli-labeled response that Node.js fetch() or other clients automatically decompress, including when the request asks for identity encoding.
- A crafted Brotli stream can trigger an unchecked copy into adjacent decoder state, enabling memory disclosure or a redirected write; a forbidden block switch can also make the decoder loop and consume a CPU core.
- The article reports confirmed in-the-wild exploitation and cites Imperva's demonstration of code execution on the official Node.js 24.22.0 Linux ARM64 image after several attempts.
- Defensive Notes
- Upgrade Node.js to 22.23.4, 24.22.1, or 26.12.1, or install the fixed package for the affected runtime or consumer. End-of-life Node.js release lines have no patch.
- Rebuild affected container images and compiled Bun executables, restart processes, and inventory other consumers of Brotli. Updating the operating system's libbrotli does not fix Java brotli4j because it bundles its own native Brotli build.
- If patching is delayed, set inflate: false on Express 5 and body-parser 2.x parsers or reject Content-Encoding: br at a reverse proxy. These are incomplete mitigations: they do not protect outbound decoding and can break legitimate compressed requests.
- Investigate decoder errors, worker exits with signal 139, sustained CPU use during decompression, and unexpected bytes in decompressed responses. Correlate by workload identity; no single signal is conclusive.
- Do not rely on payload signatures, WAF content matching, or body-size limits as complete detection or mitigation. The article says the attack is in the decoding process, the web server does not see decoded content, and tested middleware counted decompressed bytes.
MITRE ATT&CK
T1190 · Exploit Public-Facing ApplicationThe article describes exploiting the vulnerable Brotli decoder in exposed server-side applications that decompress attacker-controlled request bodies or fetched responses.T1499.004 · Application or System ExploitationA crafted stream can exploit the decoder's forbidden block-switch handling to loop indefinitely and pin a CPU core, causing denial of service from a single request.
CVE
Products
.NETThe upstream flaw sits in the Google Brotli C library, so the blast radius reaches Python, Bun, .NET, Java brotli4j, Envoy, and Istio.body-parserExpress 5 and body-parser 2.x accept Brotli-compressed request bodies by default in their JSON, raw, text, and URL-encoded parsers, and Koa and NestJS inherit the behavior.brotli4jThe upstream flaw sits in the Google Brotli C library, so the blast radius reaches Python, Bun, .NET, Java brotli4j, Envoy, and Istio.brotlicffiPython Brotli and brotlicffiBunThe upstream flaw sits in the Google Brotli C library, so the blast radius reaches Python, Bun, .NET, Java brotli4j, Envoy, and Istio.EnvoyThe upstream flaw sits in the Google Brotli C library, so the blast radius reaches Python, Bun, .NET, Java brotli4j, Envoy, and Istio.ExpressExpress 5 and body-parser 2.x accept Brotli-compressed request bodies by default in their JSON, raw, text, and URL-encoded parsers, and Koa and NestJS inherit the behavior.Google BrotliThe upstream flaw sits in the Google Brotli C library, so the blast radius reaches Python, Bun, .NET, Java brotli4j, Envoy, and Istio.IstioThe upstream flaw sits in the Google Brotli C library, so the blast radius reaches Python, Bun, .NET, Java brotli4j, Envoy, and Istio.KoaExpress 5 and body-parser 2.x accept Brotli-compressed request bodies by default in their JSON, raw, text, and URL-encoded parsers, and Koa and NestJS inherit the behavior.NestJSExpress 5 and body-parser 2.x accept Brotli-compressed request bodies by default in their JSON, raw, text, and URL-encoded parsers, and Koa and NestJS inherit the behavior.Node.jsOn October 21, 2026, Node.js released fixes for CVE-2026-111497, an out-of-bounds write in its bundled Brotli decoder.Python BrotliPython Brotli and brotlicffi
