Nano Solutions

HTTP2Shell: The Brotli Bug That Reached Almost Every HTTP Stack

15 min read Petr Červenka Petr Červenka
cybersecurity cloud
HTTP2Shell: The Brotli Bug That Reached Almost Every HTTP Stack
Photo by Derrick Coetzee on Wikimedia Commons
On this page 8 sections
  1. Check your stack
  2. What went wrong
  3. Fixed versions
  4. Is it being used in attacks?
  5. If you cannot patch today
  6. Frequently asked questions
  7. Sources
  8. Worried about a gap?

The short version

  • CVE-2026-111497 is a critical out-of-bounds write in Google's Brotli decoder, versions 1.0.3 to 1.2.0. CVSS 9.2. A crafted compressed stream can leak memory, crash a process or run code, with no login.
  • It started as “node2shell” in Node.js on 21 October, reached Python packages on the 22nd, and became “HTTP2Shell” across HTTP stacks on the 23rd.
  • No attacks reported as of 26 October, and researchers say the exploit is hard to get working. Patch while that lasts.
  • Fixed: Node.js 22.23.4, 24.22.1, 26.12.1; Brotli 1.2.1 (or 1.0.10 / 1.1.1 on older lines); Python Brotli 1.2.1 and brotlicffi 1.2.1.0; Bun 1.4.4; .NET 8.0.33, 9.0.22, 10.0.14; Envoy and Istio patch releases. Node.js 18 and 20 get no fix.
  • If you cannot patch today, stop decoding Brotli: reject incoming Content-Encoding: br and remove br from outbound Accept-Encoding.

Aikido Security named it “HTTP2Shell” on 23 October, when a Brotli bug disclosed in Node.js two days earlier spread to a much wider set of HTTP software.

OpenAI found the bug in February, and it was fixed in Brotli's source code then. Nobody flagged it as a security problem, so no release shipped the fix until October. Now every project that bundles Brotli has to ship its own update: runtimes, libraries, proxies, appliances and container images.

Check your stack

Pick what you run, then the version. You get a verdict and the next thing to do. It runs in your browser and sends nothing anywhere.

HTTP2Shell checker

Are you exposed?

Two taps. Based on the fixed releases published 21 to 26 October 2026.

What do you run?

Find out with

That does not look like a version number yet. Try something like .


      

Until it is patched: stop decoding Brotli. Reject requests with Content-Encoding: br and drop br from outbound Accept-Encoding.

What went wrong

Brotli is Google's compression format for web traffic. Its decoder ships inside Node.js, Python packages, Bun, .NET, Envoy, curl, CDNs and API gateways, usually as a dependency nobody chose.

In versions 1.0.3 to 1.2.0, a crafted stream makes the decoder write past the end of a small buffer. That can leak memory, crash the process or let an attacker run code. It works both ways. A malicious client can attack a server that decodes request bodies, and a malicious server can attack a client that decodes responses. No login is needed. NVD lists Google's CVSS v4.0 score of 9.2, critical. Node.js rates it high.

A Raspberry Pi 4 board sitting on top of a network switch
Brotli is usually not a deliberate choice; it arrives inside a runtime, a proxy or a client library. Photo by RAIL P on Wikimedia Commons.

Fixed versions

From the advisories published between 21 and 26 October:

Project Fixed release
Node.js 22.23.4, 24.22.1, 26.12.1. Node.js 18 and 20 get no fix
Google Brotli (upstream) 1.2.1; patched 1.0.10 and 1.1.1 for older lines
Python Brotli 1.2.1
Python brotlicffi 1.2.1.0
Bun 1.4.4
Envoy 1.40.0, 1.39.3, 1.38.6, 1.37.8
Istio 1.29.9, 1.30.6, 1.31.2
.NET 8.0.33, 9.0.22, 10.0.14 (25 October). .NET 7 gets no fix
Java brotli4j 1.24.0
curl / libcurl Update its Brotli dependency, or use the vendor's fixed package
Linux brotli packages Fixed in Debian, Ubuntu, Alpine and Amazon Linux. Standard Red Hat and SUSE packages had no fix on 26 October

On Ubuntu 22.04 and later, Ubuntu's own Node.js package uses the system Brotli library, so updating the OS package is the fix there. Containers and compiled binaries need a rebuild as well. A patched host does not patch an image that bundles the old library.

Is it being used in attacks?

Not that anyone has reported. As of 26 October, Rapid7 knew of no attacks in the wild, and the flaw is not on CISA's list of known exploited vulnerabilities.

Imperva's red team did run its own code on the official Node.js 24.22.0 image, after several attempts, and has not released the exploit. Public proof-of-concept code mostly crashes the process or leaks a little memory on a standard build (Sysdig).

Security researcher s1r1us of Hacktron thinks the same thing is holding attackers back here as with PHP2Shell: the exploit is hard to adapt from one target to the next. In their PHP2Shell test, only the most capable commercial AI models managed it; the freely downloadable ones did not. s1r1us also warns the gap may not last, as open models are improving fast. Use the quiet to patch.

If you cannot patch today

Stop decoding Brotli until the components are fixed.

  • Incoming requests: at the proxy, load balancer or middleware, reject any request whose Content-Encoding includes br. Match case-insensitively and handle lists of encodings.
  • Outbound requests: remove br from Accept-Encoding and turn off automatic decoding. A malicious server can send Brotli anyway, and libraries such as urllib3 pick the decoder from the response header.
  • Python: if Brotli is optional, uninstall Brotli and brotlicffi, remove extras such as httpx[brotli], regenerate the lockfile and restart.
  • Managed hosting or CDN: ask the provider which Brotli version it runs and when it was patched.
A padlock and a heavy security chain
A workaround is a temporary lock, not a fix. Get the patched component onto the device. Photo by Jennifer Bourn on WordPress Photo Directory.

Frequently asked questions

Are we safe because we use nginx or Apache?

Not automatically. Their standard Brotli modules only compress responses, so the web server itself is fine. A Node, Python or Go app behind it that decompresses request bodies is still exposed.

Does a clean scan mean we are patched?

No. For the first few days the CVE was not mapped to the PyPI packages, so pip-audit and Dependabot missed a vulnerable Brotli or brotlicffi. Aikido reported on 26 October that both flag them now, but a scanner with an out-of-date database can still miss it. Check lockfiles and installed versions directly.

Sources

Worried about a gap?

If you would like a second pair of eyes on your stack, talk to us. We help Perth businesses inventory dependencies, patch runtimes and rebuild images without the guesswork.

Related reading: PHP2Shell: Two Critical PHP Flaws and The eMudhra Certificate Authority Compromise.


Photo credits. All photos are CC0 1.0 (public domain dedication), from Wikimedia Commons and the WordPress Photo Directory:

Was this useful?

Share

Markdown
Petr Červenka

Petr Červenka

Petr is the founder and lead developer at Nano Solutions, a Perth-based custom software firm. With over a decade of experience building enterprise platforms for government and private sector clients, he leads delivery of complex projects across Australia.

Connect on LinkedIn