CyberHunter
CVE Critical · CVSS 9.2 Exploited in the wild CISA KEV CVE-2026-111497

Brotli2Shell: a memory flaw in Google's Brotli decoder exposes servers and HTTP clients

CVE-2026-111497 corrupts memory in the Brotli decoder used by Node.js, Python, .NET and proxies. Fixed in Brotli 1.2.1, 1.1.1 and 1.0.10, now in CISA KEV.

Share LinkedIn X Download video (MP4)

What happened

CVE-2026-111497, nicknamed Brotli2Shell (also Node2Shell or HTTP2Shell), is an out-of-bounds write in the decoder of Google Brotli, the compression format behind Content-Encoding: br on the web. Every Brotli version from 1.0.3 to 1.2.0 is affected, on all platforms. Google shipped fixed releases on 21 October 2026, Brotli 1.2.1, 1.1.1 and 1.0.10, the same day Node.js published its own security release. The flaw was reported by OpenAI Codex Security (Khai Tran and Sylvie Mayer).

The same C decoder is bundled in many products: Node.js, Bun, .NET, the Python Brotli and brotlicffi packages, Envoy, Istio, PHP for Windows, distribution packages and some appliances. CISA added it to its Known Exploited Vulnerabilities catalog on 27 October.

How the flaw works

A Brotli stream is cut into blocks, and the stream can announce a block switch: "the next bytes belong to another block type, with this length". The decoder checks that announcement in c/dec/decode.c.

In vulnerable versions, an invalid block switch was not treated as a format error. The Node.js advisory explains that it was reported as a temporary need for more input instead. The streaming decoder therefore kept going and appended the incoming bytes to an eight-byte internal buffer, past its end, into the decoder state stored next to it. CISA describes it as an unchecked return value (CWE-252) leading to an out-of-bounds write (CWE-787).

The overflowing bytes come from the attacker's stream. Normal encoder output never triggers the bug: it takes a deliberately malformed stream.

Why it is serious

No account is needed: the attacker only has to get a Brotli stream decoded, and that works in both directions. A malicious client can send a compressed request body (Content-Encoding: br) to a server or proxy that decodes it. A malicious server can send a compressed response to an HTTP client that decodes it automatically, such as Node.js fetch(), or Python requests, httpx and aiohttp when Brotli support is installed.

The CVE record lists four outcomes: corrupted decoder state, leaked process memory, a crash, or possibly code execution. According to Tenable, Imperva and ELLIO reproduced code execution against the official Node.js 24.22.0 build. That is the hard case, though: ELLIO's exploit for 24.22.0 failed in 10,000 attempts against neighbouring Node.js versions, and most attempts against an Express server simply crashed the worker. Reliable code execution is version-specific; crashing a service is much easier.

Scores differ with the assumptions. Google, the CNA, rates it 9.2 under CVSS 4.0. Red Hat and Microsoft give 8.1 under CVSS 3.1, with high attack complexity. Ubuntu shows 9.8 under CVSS 3.

Threat status (as of 1 November 2026)

  • In CISA KEV since 27 October, so CISA has evidence of exploitation. US federal agencies must remediate by 10 November. CISA has not published details of the attacks.
  • Exploitation attempts: ELLIO reported an attempt on 26 October targeting Node.js 24.22.0 on x86-64. Tenable has not independently confirmed it.
  • Proofs of concept: at least one public PoC claims code execution against Node.js 24.22.0 under narrow lab conditions.
  • Unfixed branches: Node.js 20, 23 and 25 get no fixed release; .NET 7 is affected without a fix.
  • Appliances: Palo Alto Networks lists PAN-OS 11.2, 12.1 and 12.2 as affected only when Brotli inspection and TLS decryption are enabled on the dataplane, with hotfixes available, and says it is not aware of exploitation.
  • Long gap: the upstream fix was committed on 27 February 2026 without a security label and only shipped on 21 October.

What to do

  1. Update the Brotli library to 1.2.1, 1.1.1 or 1.0.10, or to your distribution's fixed package: for example libbrotli1 1.1.0-2ubuntu0.1 on Ubuntu 24.04, 1.0.9-2ubuntu0.1 on 22.04, 1.1.0-2+deb13u1 on Debian 13 and 1.0.9-2+deb12u1 on Debian 12.

  2. Update everything that bundles its own copy:

    • Node.js 22.23.4, 24.22.1 or 26.12.1;
    • Bun 1.4.4;
    • .NET 8.0.33, 9.0.22 or 10.0.14;
    • Python Brotli 1.2.1 and brotlicffi 1.2.1.0;
    • Envoy 1.40.0, 1.39.3, 1.38.6 or 1.37.8;
    • Istio 1.31.2, 1.30.6 or 1.29.9;
    • PHP for Windows 8.5.12-1, 8.4.27-1, 8.3.36-1 or 8.2.35-1.
  3. Find the copies you forgot:

    • system library: ldconfig -p | grep libbrotlidec, dpkg -l 'libbrotli*', rpm -q brotli, apk info -v brotli-libs;
    • runtimes: node --version, bun --version, dotnet --list-runtimes, pip show brotli brotlicffi;
    • containers and vendored builds: search your SBOMs or image scans for brotli, and find / -name 'libbrotlidec*'.
  4. Restart and rebuild. The fixed decoder only takes effect after a process restart, and in a container only after the image is rebuilt and redeployed. Self-contained .NET apps must be rebuilt too.

  5. If you cannot patch yet:

    • reject requests carrying Content-Encoding: br from untrusted clients at the proxy or load balancer;
    • turn off automatic Brotli decoding in HTTP clients; removing br from Accept-Encoding alone is not enough, because a malicious server can send it anyway;
    • remove the Python Brotli and brotlicffi packages where they are not needed;
    • disable the Brotli decompressor filter in Envoy and Istio, in both directions.

    Turning off Brotli compression on your own origin or CDN does not help: the bug is in decompression.

Detection

Watch for repeated crashes of Node.js workers, proxies or Python services right after a request with Content-Encoding: br, especially on endpoints that never expect compressed bodies. ELLIO has published indicators from the attempt it observed; Tenable lists scanner plugins for the CVE.

More articles

All news