technology 7 min read

Node2Shell: Why the Brotli Flaw Exposes Your Entire Stack

A critical flaw in Google's Brotli compression library has forced emergency patches across Microsoft, Node.js, Python, and dozens of open-source projects. Here's what you need to know before attackers figure out exploitation.

  • Microsoft
  • Vulnerability
  • Brotli
  • Node2Shell
  • Node.js
  • Python

The quiet dependency no one checks before patching

Google’s Brotli compression library is everywhere. You probably don’t know it by name, but almost every HTTP request that arrives compressed on your servers has been through a Brotli decoder at some point. That ubiquity is exactly why CVE-2026-111497 — now nicknamed Node2Shell — sent shockwaves through three major ecosystems simultaneously.

The vulnerability is a critical out-of-bounds write in the Brotli decoder itself, affecting versions 1.0.3 through 1.2.0. Google assigned it a CVSS v4 score of 9.2. A specially crafted input can push data past the bounds of a buffer, corrupt memory, crash the process, or — in the worst case — let an unauthenticated attacker execute arbitrary code.

What makes this story unusual is not the severity of any single patch. It’s the cascading pattern: Node.js moved first, followed by the maintainers of two Python packages, then Microsoft on October 25 with updates covering .NET, Visual Studio, and PowerShell. Bun, Envoy, and Istio also shipped fixes. By late October, the list of affected software had grown so long that researchers started calling it HTTP2Shell and Broccoli2Shell.

Who found it, and when

The discovery came from researchers associated with OpenAI Codex Security, who identified the issue during red-teaming work. OpenAI notified both the Brotli developers and downstream projects, and the broader disclosure was coordinated through its Patch the Planet initiative.

Here’s the twist that should give anyone relying on Brotli pause: the fix was already in the Brotli source code. It landed in February, but nobody realized at the time that the change resolved a security vulnerability. There was no subsequent Brotli release to surface it. The vulnerability sat silently corrected for months, and the downstream ecosystems — Node.js, Python, Microsoft — were left running vulnerable copies without knowing it.

That gap between fix and disclosure matters. It means any project that bundles its own copy of Brotli rather than pulling from a shared system library could be running patched code that still harbors the vulnerability in a different form, or worse, an older unpatched copy that no one thought to audit.

Proof of concept changes the calculus

Imperva researchers demonstrated actual code execution against the official Node.js 24.22.0 image for Linux arm64. They sent malicious data both as server responses and as request bodies processed through Express 5 and body-parser 2. The exploit didn’t succeed on every attempt, but the results were conclusive: the fixed build behaved differently under the same inputs, and the unfixed build fell.

Imperva has not released the exploit publicly. That restraint is notable. The proof-of-concept code published on GitHub reportedly only achieves code execution against an intentionally weakened build, and some researchers have argued the bug may only be exploitable for denial-of-service attacks. But Imperva’s results suggest the ceiling for exploitation is higher than the conservative readings indicate.

No exploitation in the wild has been reported so far. The window between public disclosure and active exploitation is usually measured in days or weeks for a flaw of this severity. The October 25 Microsoft patches narrow that window for .NET and PowerShell environments, but many other deployments remain exposed.

Microsoft’s patching map

Microsoft’s October 25 updates cover .NET runtime versions 8.0.33, 9.0.22, 10.0.14, and .NET 11 Release Candidate 3. Visual Studio 2019, 2022, and 2026 were updated as well, along with PowerShell 7.4, 7.5, and 7.6.

Microsoft rated the issue as an elevation of privilege with a CVSS v3.1 base score of 8.1. It classified the flaw as critical for .NET and Visual Studio, important for PowerShell, and assessed the exploitability as “more likely.” That language is significant. Microsoft rarely uses “more likely” unless it has seen indicators of attempted exploitation or believes the attack path is straightforward.

The classification difference between critical (for .NET) and important (for PowerShell) is also telling. It suggests the team that evaluated PowerShell saw a narrower attack surface or additional mitigations in place — perhaps related to how PowerShell handles input streams versus the broader HTTP pipeline that .NET serves.

Python’s two-package problem

The Python ecosystem’s exposure is contained but real. Two PyPI packages ship the vulnerable decoder: Brotli (now patched at version 1.2.1) and brotlicffi (patched at version 1.2.1.0). Any project depending on either of those packages and pulling from PyPI was running vulnerable code until the updates landed.

Python projects are particularly exposed because many embed their own copy of Brotli rather than relying on the operating system’s library. That means a pip upgrade doesn’t always reach the code actually executing in production — especially in containers that pin base images and don’t rebuild.

The unpatched long tail

A public tracker maintained by researchers lists several major projects that still bundle their own unpatched copy of the Brotli decoder: DuckDB, Apache Arrow, 7-Zip-zstd, p7zip, and EDK II. The tracker’s maintainers say the list is incomplete. Not every configuration of those projects necessarily exposes the vulnerable code, but the risk cannot be dismissed.

DuckDB and Apache Arrow are especially relevant to data engineering and analytics pipelines. Both handle large volumes of compressed data, often from untrusted sources. If either project decompresses user-supplied Brotli data without a fix, the attack surface is broad.

Microsoft’s own advisory notes that any application passing attacker-controlled data to an affected decoder is exposed. That includes compressed HTTP request bodies, responses fetched from untrusted servers, and compressed files. The list is not exhaustive — it describes the most common paths, not every possible one.

What happens next

The first lesson from Node2Shell is structural: when a foundational library like Brotli ships a fix without a new release, downstream ecosystems have no trigger to act. Projects that bundle their own copy won’t see the fix until someone audits the source tree. Projects that depend on system libraries won’t see it until the OS vendor pushes an update. The gap is predictable but invisible.

The second lesson is operational. Applying the updates is only half the work. Processes already running in production continue using the vulnerable code until they are restarted. Container images must be rebuilt on top of patched base images. Automated patching tools that detect a new package version but do not restart services will leave infrastructure exposed.

The third lesson is about attribution and timing. OpenAI’s disclosure was coordinated and responsible. The fix predated the public announcement by eight months. That kind of responsible disclosure benefits the ecosystem, but it also means the vulnerability existed in the wild for longer than the public timeline suggests. Any attacker with access to the February Brotli source could theoretically identify the issue independently — though the complexity of exploiting an out-of-bounds write in a real-world setting may be enough of a barrier to keep most opportunistic attackers at bay.

No one has reported active exploitation yet. That is the best-case scenario. It should not be interpreted as a reason to delay patching. The architecture of the flaw — an out-of-bounds write triggered by compressed input — is exactly the kind of vulnerability that turns profitable quickly once a reliable exploitation path is discovered. The Imperva proof of concept shows the path exists. The question is when someone else replicates it with a targeted workload.

The unpatched projects on the tracker are the most immediate risk. DuckDB, Apache Arrow, and the others are widely deployed in data infrastructure. If an attacker compromises a single ingestion pipeline that decompresses untrusted Brotli data, the escalation path from there to arbitrary code execution is short. Organizations running those projects should prioritize them alongside the Microsoft and Node.js patches.

Brotli is too embedded to replace. The right move is to audit which copies are running in production, rebuild container images, restart services, and treat the unpatched tracker as a live map of where the next wave of exposure will come from.