Node2Shell evolves to HTTP2Shell. Brotli flaw (CVE-2026-111497) blast radius affects many libraries & apps using HTTPs.
Pangram verdict · v3.3
We believe that this text is a mix of AI and human-written content.
AI likelihood · overall
MixedArticle text · 1,412 words · 23 segments analyzed
TL;DR⚠ Brotli is a used widely compression library from Google. On Wednesday, October 21nd 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. On Thursday, Python disclosed that Python packages were vulnerable to CVE-2026-111497 as well.On Friday, October 23rd, it has become known that this CVE affects other major languages and service applications using HTTP, where patches are not yet fully available.Check if you are decoding Brotli as a dependency within your libraries. Stay on guard for wider announcements and be ready to upgrade as soon as possible. If there is no patch available for a library or application that may be affected, we recommend disabling Brotli decoding until patches become available.Update 4:12PM PT: Patches are available for libbrotli, Python, C++, NodeJS, bun, Envoy and more coming. Apache and Nginx do not decode brotli by default.Update 4:15 PM PT: OpenAI shares that they discovered this vulnerability in Feburary. While the root cause issue was fixed in the Brotli source code at the time, it wasn’t known that it gave rise to a security vulnerability. OpenAI's advisories here. What is Brotli?Brotli is a lossless compression algorithm and data format developed by Google. It’s a way to make data smaller for storage or sending over the internet. Software then unpacks it to recover the original data. It’s widely used for HTTP compression to compress web content such as HTML, CSS, and JavaScript.What is CVE-2026-111497?CVE-2026-111497 is an out-of-bounds write in the Google Brotli decoder affecting versions 1.0.3 through 1.2.0 on all platforms. This is the same Brotli decoder flaw behind Node2Shell announced a couple days ago. A remote, unauthenticated attacker can send a crafted Brotli-compressed stream to corrupt memory, leak sensitive data, crash the process, or potentially execute arbitrary code. It carries a CVSS v4.0 score of 9.2 (Critical), and Node.js is affected through its bundled Brotli library.A bug makes the Brotli decoder keep accepting more bytes when it should reject the data.
Those bytes can overflow a small working buffer and damage the program’s memory.
An attacker can use that damage to control what runs, such as their own code.OpenAI found this in February reported it as unauthenticated remote code execution that works in both directions, so a malicious client can take over an unpatched server and a malicious server can take over an unpatched client that accepts compressed responses.The root cause was fixed in the Brotli source code in February, but it wasn't recognized as a security issue at the time and no release shipped with the fix until now.
That means every project that bundles Brotli has to ship its own update.
You’re exposed if any environment has Brotli 1.2.0 or earlier or brotlicffi 1.2.0.x installed, since HTTP clients such as requests, httpx, and aiohttp load these packages automatically when they’re present.
Upgrade to Brotli 1.2.1 or brotlicffi 1.2.1.0 and rebuild any container images that bundle them.
As of October 23, advisory databases don’t map the CVE to either PyPI package, so pip-audit, Dependabot, and Safety won’t flag vulnerable versions yet.You can see what we’ve tracked here in Aikido Intel.
PythonC++LibbrotilNodeJSAs far as unaffected software, Apache’s standard mod_brotli does not decode BrotliFor CVE-2026-111497, update the affected runtime or Brotli library:Node.js: upgrade to 22.23.4, 24.22.1, or 26.12.1, or a newer supported release in the corresponding release line.Native Brotli / libbrotli: upgrade to 1.2.1 or later.
For older release lines, use patched 1.0.10 or 1.1.1.Python packages: upgrade Brotli to 1.2.1 or later and brotlicffi to 1.2.1.0 or later, wherever installed.curl / libcurl: update its Brotli dependency to 1.2.1, a patched older release, or the vendor’s security-fixed package. Bundled or statically linked copies require an updated application build.Bun: upgrade to 1.4.4 or later. Rebuild compiled executables that bundle Bun.Envoy: upgrade to 1.40.0, 1.39.3, 1.38.6, or 1.37.8, or a newer release in a supported branch. 1.36.12 also includes the fix, but the 1.36 branch is unsupported.Istio: the fix is included in 1.29.9, 1.30.6, and 1.31.2. Use a newer supported release in the corresponding line; the 1.29 branch is end of life.Operating-system packages: install the vendor’s security update. Vendors may backport the fix without changing the upstream version number.Other HTTP servers, reverse proxies, API gateways, and HTTP clients: update the affected runtime or Brotli library they use. Where Brotli is bundled into the product, install the product vendor’s release that explicitly addresses this CVE. For managed services, confirm remediation with the provider.Update dependency locks, rebuild affected applications and container images, redeploy, and restart services. Verify that running workloads use the patched components. Fixed releases, reviewed October 23, 2026 Project Patch status Fixed versions Notes Node.js Patch available 22.23.4 · 24.22.1 · 26.12.1 Use a supported release line. Bun Patch available 1.4.4 Includes Brotli 1.2.1. Envoy Patch available 1.40.0 · 1.39.3 · 1.38.6 · 1.37.8 1.36.12 also includes the fix, but 1.36 is unsupported.
Use a supported branch.
Istio Patch available 1.29.9 · 1.30.6 · 1.31.2 1.29 is end of life, so move to a supported line. Google Brotli (upstream) Patch available 1.0.10 · 1.1.1 · 1.2.1 Choose the fixed release for your library branch. What to do if you can't upgrade yetThese workarounds reduce exposure while you prepare the upgrade:Python applications: where Brotli support is optional, uninstall both Brotli and brotlicffi from affected environments. Remove dependency extras such as httpx[brotli] and any other requirements that would reinstall them, then regenerate dependency locks and rebuild/restart workloads. HTTPX, Requests, and urllib3 retain gzip and deflate support without these optional packages. However, a server that sends Brotli anyway may produce an unreadable response or an application error; automatic fallback is not guaranteed. Uninstalling both Python packages and restarting workloads removes the decoding paths provided by those packages for incoming and outgoing data. It does not remove separate Brotli decoders bundled into other runtimes, libraries, or products.Incoming HTTP requests: reject requests whose Content-Encoding includes br at the reverse proxy, load balancer, or application middleware, before any vulnerable decoder processes the body.
Match br case-insensitively, including within lists of encodings.
Outbound HTTP requests: remove br from Accept-Encoding.
Also disable Brotli response decoding or reject responses whose Content-Encoding includes br before decoding begins.
Ensure this check occurs before automatic body processing; checking after the client has downloaded and decoded the response is too late.Changing Accept-Encoding alone is insufficient: a malicious server can send a Brotli response regardless of what the client advertises, and urllib3 selects its decoder from the response’s Content-Encoding header.Keep these controls in place until affected components are patched and verified.
Review coverage as vendors confirm additional affected components or attack paths.How Aikido helps with CVE-2026-111497Aikido flags vulnerable versions of Brotli and brotlicffi in your repositories, container images, and dependencies, including when they arrive as transitive dependencies.
Your dashboard shows which services still run a vulnerable version, so you can upgrade the ones that call outside servers or accept compressed request bodies first.
Once you've upgraded, Aikido checks if the finding is gone.The timelineBrotli is a widely used compression library from Google. On Wednesday, October 21nd 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. Users were exposed if their app or a library decompresses bad Brotli data (e.g. the built-in fetch(), body-parser).The next day, Python released a security update that patches the same flaw; Python packages were also vulnerable to CVE-2026-111497. Brotli flaw may affect even more languages and service applications, given how widely integrated the library is downstrm. It turns out OpenAI had found this back in February.Techincal details of CVE-2026-111497The flaw sits in DecodeBlockTypeAndLength(), which handles block switches, the points where a Brotli stream changes which Huffman tree it uses.
In vulnerable versions the function returns a plain boolean, and BROTLI_FALSE can mean either "this stream is malformed" or "I need more input."
Callers can't tell the two apart, and on the fast path the decoder discards the return value entirely.A crafted stream can declare a single block type and then exhaust that block's length, which forces a switch that can't succeed.
The decoder then either reports that it needs more input for a stream that's complete, or keeps decoding with the block state it already had.
That second path leads to the out-of-bounds write.The upstream fix, google/brotli commit 0ed4268, makes the function return an error code and adds a new error, BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH (-17).
Decoding now stops on a format error on both the safe and fast paths.