Node2Shell: The Brotli Flaw Hiding Inside Your Servers — Patch Before Attackers Weaponize It


Every few weeks, a new “internet-breaking” vulnerability makes the rounds. Most turn out to be overhyped. This one deserves your attention anyway — not because it is being exploited right now, but because it hides in a place almost nobody thinks to patch: a compression library.

What Is Brotli?

Brotli is a data compression format developed by Google. When your browser loads a website, the server often compresses the page with Brotli (you will see it as Content-Encoding: br) so it downloads faster. It is fast, efficient, and everywhere — bundled into Node.js, Python packages, web servers, proxies, and cloud tools.

The Flaw: CVE-2026-111497

The flaw, nicknamed “Node2Shell” (also called HTTP2Shell and Broccoli2Shell — all the same bug), is an out-of-bounds write in the C code of the Brotli decoder. In plain terms: if a program feeds a specially crafted compressed payload into the decoder, the decoder writes data past the end of its memory buffer. That can crash the process, leak memory contents, or — in the worst case — let an attacker run their own code.

It was discovered by OpenAI’s Codex Security team and disclosed in Node.js’s October 21 security release. Google, as the CVE numbering authority, scores it 9.2 out of 10 (CVSS 4.0). The Node.js project rates its own impact as High.

Who Is Actually Affected?

Here is the part most people get wrong: simply serving Brotli-compressed web pages does not expose you. The danger is on the decoding side — when your software decompresses Brotli data that comes from an untrusted source. That happens in more places than you would expect:

  • Node.js servers using Express 5 or body-parser 2.x, which automatically decompress request bodies sent with Content-Encoding: br.
  • Node’s built-in fetch(), which transparently decodes Brotli responses from any server your code talks to.
  • Python apps using urllib3, requests, aiohttp or httpx with the brotli extra installed — these decode Brotli responses automatically.
  • Cloud and proxy tools like Envoy, Istio, and various vendors’ products that bundle the library — Palo Alto Networks confirmed PAN-OS and some Prisma Cloud components are affected.

Wiz Research estimates 91% of cloud environments contain resources with a vulnerable Brotli version, and 82% have publicly exposed Node.js instances. The library is so deeply embedded that many teams do not even know they ship it.

Is It Being Exploited?

As of October 27, no confirmed in-the-wild exploitation has been reported, and the flaw is not in CISA’s Known Exploited Vulnerabilities catalog. But public proof-of-concept code exists, and researchers have demonstrated code execution against an unmodified Node.js 24.22.0 image in a lab. The window between “public PoC” and “real attacks” is often short — treat this as a patch-now situation, not a wait-and-see one.

How to Fix It

  • Node.js: Update to 22.23.4, 24.22.1, or 26.12.1 (or newer patch releases on those lines). Note that Node.js 20.x and older are end-of-life and will not receive a fix — move to a supported line.
  • Bun: Upgrade to 1.4.4 or newer.
  • Python: Upgrade the Brotli package to 1.2.1 and brotlicffi to 1.2.1.0, or uninstall them where Brotli support is optional.
  • Containers and cloud: Rebuild and redeploy container images so the patched library is actually loaded, and restart processes after updating — a patched file on disk does nothing until the process restarts.
  • Vendor products: Check your vendors’ advisories (PHP rebuilt its Windows packages with Brotli 1.2.1; Microsoft and others shipped emergency updates) and apply them.
  • Temporary mitigation: If you cannot patch immediately, block or disable Brotli decoding for untrusted input at your perimeter, and monitor for crashes or unusual decompression activity.

The Bigger Lesson

A compression library sounds boring — until you realize it sits inside nearly everything. Modern software is built from layers of open-source components, and a flaw in one quiet layer can ripple across the whole stack. The fix is unglamorous but effective: keep an inventory of what your systems actually run, patch runtimes and libraries (not just your own code), and restart services after patching. Attackers do not care about CVSS scores — they care about what they can reach. Patch what they can reach first.

Also worth noting this week: CISA added the PHP2Shell flaws (covered here on October 23) to its Known Exploited Vulnerabilities catalog on October 26, with a federal patch deadline of October 29. If you run PHP and have not updated to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 yet, that clock is now very real.

Comments

Popular Posts