HTTP2Shell: Brotli Flaw Puts Node.js and .NET at Risk of RCE
A critical flaw in Google's Brotli compression library affects Node.js, Python packages and .NET applications. Patches are out, but updating Brotli alone may not be enough.

A critical security flaw has surfaced in Brotli, a compression algorithm used widely across the web. Dubbed HTTP2Shell, and also referred to as Node2Shell and Broccoli2Shell, the vulnerability can lead to memory corruption and, in some cases, remote code execution (RCE). Several technology companies and open-source projects have already released patches.
The flaw is being compared to the recently disclosed PHP2Shell vulnerabilities. Given the variety of affected software, system administrators are advised not to stop at updating a single library.
Technical details of the flaw
Brotli is an open-source data compression algorithm developed by Google. Because it shrinks data losslessly, it shortens transfer times and uses less bandwidth. It is commonly used on the web to compress HTTP responses such as HTML, CSS and JavaScript, and most browsers, servers and software libraries support it.
The bug is described as an out-of-bounds write. It is tracked as CVE-2026-111497 and rated critical with a score of 9.2 out of 10. According to the National Vulnerability Database, the flaw causes a buffer overflow that can lead to memory disclosure, denial of service and, in some cases, remote code execution.
Node.js explained that an invalid block transition was being reported not as a permanent format error but as a temporary need for more input. As a result, the stream-based decoder kept appending input bytes to an eight-byte internal buffer. According to the advisory, an attacker who can control Brotli data that an application decompresses with node:zlib could corrupt process memory, causing a crash, disclosure of process memory or remote code execution.
Who is affected and which patches are available
Because Brotli is embedded in so much software, the exposure is broad. Node.js, brotlicffi and HTTP clients such as Requests, urllib3, httpx and aiohttp are at risk, as are applications that rely on a Brotli decoder, including Bun and Envoy distributions. On the Node.js side, versions 26.x, 24.x and 22.x are reported as affected.
Google fixed the flaw on October 21, 2026 with Brotli 1.0.10, 1.1.1 and 1.2.1, and Node.js shipped its own patch the same day. PyPI packages containing the fixes followed two days later, on October 23. Microsoft released an emergency update for .NET over the weekend, saying a successful exploit could lead to privilege escalation. Because some software bundles its own Brotli decoder or uses vulnerable versions, updating Google's library alone may not protect every application.
The patched versions are: Google Brotli 1.0.10, 1.1.1 and 1.2.1; Node.js 22.23.4, 24.22.1 and 26.12.1; Python Brotli 1.2.1; and Python brotlicffi 1.2.1.0.
Exploitation status and mitigations
Around the same time, a person or group set up a dedicated site, Broccoli2Shell.com, which describes the issue, tracks vulnerable versions and reportedly documents exploits attempted in the wild. According to the site, a public proof of concept (PoC) was published on GitHub on October 22, 2026. The PoC is said to achieve code execution only on a deliberately weakened build, while on standard builds it causes a crash and a limited memory read. The same source says no malicious use has been reported so far.
Administrators are advised to apply the patches as soon as possible, restart affected processes, and rebuild and redeploy affected container images. Those who cannot update immediately can partially reduce the risk. Python users can remove the vulnerable Brotli and brotlicffi packages and drop optional dependencies such as httpx[brotli]. Proxies, load balancers or web application firewalls can also be configured to reject incoming request bodies compressed with Brotli. That approach does not protect applications that download and decompress malicious HTTP responses, however. For Node.js, no complete workaround has been identified.
Comments
No comments yet. Be the first to comment.


