Skip to content

Image: cdn.prod.website-files.com · rights & removal

Executive Summary

A vulnerability in the Brotli decompression library, tracked as CVE-2026-111497 and nicknamed "node2shell" or "Broccoli2Shell," allows remote, unauthenticated attackers to cause memory leaks or execute arbitrary code by sending specially crafted Brotli-compressed streams. The flaw resides in the Brotli decoder's handling of block switches, where it can lead to out-of-bounds writes if a malicious stream is processed. This vulnerability affects software using Brotli decoding, particularly within environments like Node.js and Python packages that bundle the library. Because the root cause was fixed in the source code but was not recognized as a security issue until recently, many applications relying on bundled libraries remained vulnerable. Immediate remediation involves upgrading affected runtime components or Brotli libraries, with specific patch versions provided for Node.js, Python packages, Envoy, and others. Workarounds involve rejecting requests containing `br` in the Content-Encoding header or disabling Brotli decoding entirely where immediate upgrades are not feasible.

Facts Only

* CVE-2026-111497 is an out-of-bounds write in the Google Brotli decoder affecting versions 1.0.3 through 1.2.0 across platforms.
* The flaw occurs in the `DecodeBlockTypeAndLength()` function, which handles block switches in the Brotli decoder.
* A crafted stream can force a block switch that results in an out-of-bounds write, potentially leading to memory corruption or arbitrary code execution.
* The vulnerability affects Node.js through its bundled Brotli library.
* Python packages, specifically Brotli and brotlicffi versions 1.2.0 or earlier, are vulnerable due to shared decoder implementation.
* High-severity scores were assigned, with a CVSS v4.0 score of 9.2 for the vulnerability.
* Patches are available for libbrotli, Python packages, C++, NodeJS, bun, Envoy, and Istio among others.
* Affected Python packages include Brotli (fixed at 1.2.1) and brotlicffi (fixed at 1.2.1.0).
* Mitigation involves updating software to patched versions or disabling Brotli decoding where immediate patching is impossible.

Full Take

The existence of a critical memory safety flaw that persists across multiple language runtimes, HTTP clients, and service meshes highlights a systemic challenge in managing transitive dependencies derived from widely used foundational libraries like Brotli. The fact that the fix was present in the source code but remained unrecognized until post-disclosure illustrates a critical gap between internal engineering security and public disclosure, suggesting that deep architectural flaws often require external scrutiny to be identified.
The pattern of this vulnerability cascading through different layers—from the core compression algorithm (Brotli) to system libraries (libbrotli), runtime environments (Node.js, Python), and infrastructure components (Envoy, Istio)—demonstrates a failure in maintaining security hygiene across the entire software supply chain. The immediate response forces users into complex mitigation strategies: patching specific dependencies while simultaneously implementing workarounds that often involve selectively disabling functionality, trading operational capability for safety.
The implication is that relying on automatic dependency resolution alone is insufficient; cognitive sovereignty requires understanding the deep integration points where fundamental data handling mechanisms intersect with application logic. The focus shifts from simply applying patches to understanding *why* these vulnerabilities are latent—in this case, the delay in recognizing a compression error as an exploitable memory corruption path demonstrates how security oversight can lag behind development velocity.
What underlying assumptions about dependency management and runtime integrity allow such deep vulnerabilities to persist within widely adopted standards? If software vendors fail to fully internalize findings before release, what structural mechanisms need to be established for mandatory security review of core algorithms themselves? How can the industry shift from reactive patching based on CVEs to proactive, self-auditing architectures that assume data processing layers are inherently untrusted until proven otherwise?

From the original · Aikido Security Research

TL;DR ⚠️ Brotli is a widely used compression library from Google. On Wednesday, October 21st NodeJS disclosed CVE-2026-111497, dubbed “node2shell,” wherein a Node.js process that decompresses attacker-controlled Brotli data can be made to leak memory or run arbitrary code.
Read the full story at aikido.dev
Node2Shell evolves to HTTP2Shell. Brotli flaw (CVE-2026-111497) blast radius affects many libraries & apps using HTTP. | Huntaegis