Security · Published 2026-11-02
Node2Shell (CVE-2026-111497): Patch and Verify
CVE-2026-111497 is a Brotli decoder bug that CISA lists as exploited. Find every runtime that carries it, patch it, restart, and verify the rollout.
Update, 9 November 2026: the CISA remediation date is 10 November. US federal agencies must have this fixed by tomorrow, and everyone else should treat it as the same deadline. RHEL-family fixes have shipped since this was written: AlmaLinux 10.2 has
libbrotli-1.1.0-8.el10_2.1, whose changelog names the CVE (checked on our AlmaLinux 10.2 test machine, the RHEL check is below, under "A Node.js from your distribution is different"). PHP published fixed Windows builds on 26 October (see the table).
TL;DR
- CVE-2026-111497 (nicknamed Node2Shell, also Brotli2Shell) is a memory-corruption bug in Google's Brotli decoder. A crafted Brotli stream makes the decoder write past the end of an internal buffer. Depending on the program, the result can be a crash, disclosure of memory or, potentially, code execution in the process that decompresses the data.
- It is not only a Node.js bug. Node.js bundles Brotli, but so do Bun, .NET, Envoy and Istio, the Python packages
Brotliandbrotlicffi, and a PHP extension. Linux distributions also ship it as a shared library that other programs, browsers included, load. - CISA lists it as exploited. It was added to the Known Exploited Vulnerabilities catalog on 27 October, with a remediation date of 10 November for US federal agencies and known ransomware use marked "unknown". Public proof-of-concept code exists. Tenable reports that exploitation is unreliable and that most lab attempts crash the worker instead of giving a shell.
- You are exposed where a process decompresses Brotli data that an attacker can influence, for example a request body, a response from a server you call, or an uploaded file.
- Fixed versions: Node.js 22.23.4, 24.22.1 and 26.12.1; Brotli 1.0.10, 1.1.1 and 1.2.1; Python
Brotli1.2.1 andbrotlicffi1.2.1.0; Bun 1.4.4; .NET 8.0.33, 9.0.22, 10.0.14 and 11 RC3; Envoy 1.40.0, 1.39.3, 1.38.6, 1.37.8 and 1.36.12; Istio 1.31.2, 1.30.6 and 1.29.9. - Updating a file on disk is not enough. Restart the processes, rebuild container images, and republish self-contained .NET applications and compiled Bun executables.
- Do not trust version strings. We checked official Node.js builds:
process.versions.brotliis identical before and after the fix. And Ubuntu'slibbrotli1 1.2.0-3ubuntu0.1is a fixed build, although upstream 1.2.0 is in the affected range.
How this was checked
The facts below were read from the vendor and government pages listed under Sources on 2 November 2026. Commands marked tested were run on an Ubuntu 26.04 test machine with the official Node.js images, a kind cluster, nginx 1.27 and a Python virtual environment. No exploit code and no malformed Brotli data was used anywhere: this article contains none and does not link to any.
Timeline
- 21 October: Node.js published security releases 22.23.4, 24.22.1 and 26.12.1 for a flaw reported by OpenAI Codex Security. Google released Brotli 1.2.1 the same day with the CVE in its security notes.
- 25 October: Ubuntu published
brotli 1.2.0-3ubuntu0.1for 26.04 (the changelog is dated 25 October). - 26 October: Red Hat published bulletin RHSB-2026-015 (Important). Tenable published a FAQ.
- 27 October: CISA added the CVE to the KEV catalog. Red Hat updated its bulletin.
- 30 October: The Cyber Security Agency of Singapore issued an alert that cites a public proof of concept and reported exploitation.
What changed since publication
Updated 9 November 2026.
- Added the CISA remediation date (10 November) as a deadline note at the top.
- RHEL family: a fixed RHEL 10 build now exists (
libbrotli-1.1.0-8.el10_2.1on AlmaLinux 10.2). The table row says so, and the RHEL check under "A Node.js from your distribution is different" is now a tested command with real output. The earlier, untested command queried thebrotlicommand-line package instead of thelibbrotlilibrary. - PHP: PHP for Windows builds that bundle Brotli are fixed in 8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1 (php.net, 26 October), with a note on when the decoder is reached.
What the bug is
Brotli is the compression format behind Content-Encoding: br. The Node.js advisory describes the failure in the decoder: "An invalid block switch was reported as a temporary need for more input instead of a permanent format error, so the streaming decoder kept appending input bytes to an eight-byte internal buffer." Anyone who can supply Brotli data that an application decompresses can corrupt process memory. The fix reports an invalid block switch as a format error. Ubuntu's changelog describes its patch as "Detect and report invalid stream earlier" in c/dec/decode.c and c/include/brotli/decode.h.
Well-formed Brotli data is not affected: compressing and decompressing ordinary data still worked on the affected and on the fixed builds we tried.
The scores differ, because the scorers differ:
| Source | Score |
|---|---|
| Node.js | High |
| Google (the CVE record) and the GitHub advisory | CVSS 4.0, 9.2 (Critical) |
| Red Hat | CVSS 3.1, 8.1 (Important) |
| Cyber Security Agency of Singapore | CVSS 3.1, 9.8 |
The weakness class differs too. The CVE record and CISA's catalog title ("Unchecked Return Value", CWE-252) describe the cause: the decoder ignored an error. Red Hat and Bun call it an out-of-bounds write (CWE-787), which is the effect. They describe the same bug.
Is it being exploited?
Treat it as exploitable. CISA lists it as exploited in the wild. Tenable says ELLIO reported an exploitation attempt, which Tenable had not confirmed itself, and that public proofs of concept are available. Researchers have shown remote code execution, but Tenable also reports that the exploits have to be tuned to specific Node.js builds and that most lab attempts crashed the worker process. No source we read names a threat actor.
For defenders that has two consequences. Patching is urgent because working exploits exist. And a crashing or restarting worker that decompresses Brotli is a sign worth investigating, because failed attempts look like crashes.
Where the decoder lives
The decoder reaches your systems in three ways, and each one is checked and fixed differently:
| Product | Affected | Fixed | Condition |
|---|---|---|---|
| Google Brotli (C library) | 1.0.3 to 1.2.0 | 1.0.10, 1.1.1, 1.2.1 | A program that decompresses untrusted data with it |
| Node.js | 22.x before 22.23.4, 24.x before 24.22.1, 26.x before 26.12.1 | 22.23.4, 24.22.1, 26.12.1 | node:zlib Brotli APIs and anything built on them. Lines past end of support (20, 23, 25, per Tenable) get no fix |
| Bun | 1.0.21 up to 1.4.4 | 1.4.4 | Executables made with bun build --compile stay affected until rebuilt |
| .NET | 8, 9, 10 before the fixed runtimes; 11 before RC3 | 8.0.33, 9.0.22, 10.0.14, 11 RC3 | ASP.NET Core request decompression, HttpClient automatic decompression, or the System.IO.Compression Brotli APIs. The first two are off by default. .NET Framework is not affected |
| Envoy | 1.39.2, 1.38.5, 1.37.7 and 1.36.11 are the versions the advisory lists | 1.40.0, 1.39.3, 1.38.6, 1.37.8, 1.36.12 | Only deployments with the Brotli decompressor configured |
| Istio | 1.31.0 to 1.31.1, 1.30.0 to 1.30.5, 1.29.0 to 1.29.8 | 1.31.2, 1.30.6, 1.29.9 | Users who enable Brotli decompression, for example with an EnvoyFilter. 1.29 reached end of life on 15 October 2026, so 1.29.9 is the last release |
Python Brotli and brotlicffi | Brotli before 1.2.1, brotlicffi before 1.2.1.0 | 1.2.1 and 1.2.1.0 | See the note on HTTP clients below |
PHP extension kjdev/php-ext-brotli | before 0.21.1 | 0.21.1 | Reported by Semgrep; PHP for Windows builds bundle Brotli: fixed in 8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1 (php.net, 26 October). There the decoder is reached through cURL with automatic response decompression, which is off by default but which applications and HTTP client libraries can turn on |
Ubuntu brotli package | 26.04 and 24.04 before the updates | 26.04: 1.2.0-3ubuntu0.1, 24.04: 1.1.0-2ubuntu0.1 | Ubuntu rates it High. Its nodejs package is listed as not affected on both releases, because it uses the system library |
Debian brotli package | bookworm 1.0.9-2, trixie 1.1.0-2 | bookworm 1.0.9-2+deb12u1, trixie 1.1.0-2+deb13u1, unstable 1.2.0-4.1 | |
| RHEL 7, 8, 9, 10 | Directly affected | No fixed packages in the bulletin at its last update (27 October). Since then, a fixed RHEL 10 build exists: AlmaLinux 10.2 has libbrotli-1.1.0-8.el10_2.1 (checked 9 November; the changelog entry naming the CVE is dated 22 October). RHEL 7, 8 and 9: check Red Hat's advisory for your release | Red Hat also tells users to avoid browsing untrusted sites with Firefox and Thunderbird until updated packages ship |
Semgrep's list of 27 October also names programs that bundle Brotli and had no fix yet: 7-Zip-zstd, p7zip, EDK II, DuckDB, Apache Arrow, v8-jsi and the Makefile build of woff2. Several others, such as ClickHouse and NanaZip, had a fix on a development branch but no release. That list covers only the packages confirmed so far, and it will have changed.
Python HTTP clients. Aikido reports that urllib3 (and therefore requests), httpx with its Brotli extra and aiohttp decode Brotli when one of the packages is installed, so an installed package can be enough even if your code never imports it. The same article says its authors did not pursue code execution in the Python extension, so exploitability there is not shown. The cheap precaution is the same either way: update the package, or remove it where nothing needs it.
How to check what you run
The first question is where each runtime keeps its decoder: inside the runtime, or in a shared library of the system.
Node.js
Official Node.js builds bundle the decoder (we tested the official Docker images and a Windows installer build). The process.versions.brotli field does not help: it printed the same value before and after the fix. A harmless probe does. The fixed builds define an error constant that the old ones do not, and typeof on it needs no malformed data:
# Read-only: does this Node.js know the new decoder error? "number" means the fix is in; "undefined" means it is not
node -p "process.version + ' probe=' + typeof require('zlib').constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH"# Real output from the test machine: official images, one build before and one after the fix on each supported line
v22.22.1 probe=undefined
v22.23.4 probe=number
v24.19.0 probe=undefined
v24.22.1 probe=number
v26.12.0 probe=undefined
v26.12.1 probe=numberThe Node.js advisory does not mention this constant. We found it by comparing builds, and it held on all six builds above. Use it as a second signal next to the version number, not instead of it, and do not rely on it for a custom build.
process.versions.brotli for the same builds, for the record: 1.1.0 on both 22.22.1 and 22.23.4, and 1.2.0 on both 24.19.0 and 24.22.1. The fix is a patch inside the runtime, not a new library version.
A Node.js from your distribution is different
Debian and Ubuntu build nodejs against the system library. On the test machine the probe printed undefined for a Node.js that is in fact protected, because its decoder is the patched system library:
# Read-only: where does this node get its decoder, and does the library's changelog list the fix?
dpkg -S /usr/bin/node
ldd /usr/bin/node | grep -i brotli
zcat /usr/share/doc/libbrotli1/changelog.Debian.gz | sed -n '1,8p'# Real output from the test machine (Ubuntu 26.04), shortened to the decoder line of ldd
nodejs: /usr/bin/node
libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007bf2a0483000)
brotli (1.2.0-3ubuntu0.1) resolute-security; urgency=medium
* SECURITY UPDATE: DoS or code exec via buffer overflow
- debian/patches/CVE-2026-111497.patch: Detect and report invalid stream
earlier. in c/dec/decode.c, c/include/brotli/decode.h.
- CVE-2026-111497Here node -v says 22.22.1 and process.versions.brotli says 1.2.0, both of which look vulnerable, and the machine is protected by the library's security update. For a distribution package, trust the distribution's advisory and changelog (Ubuntu's CVE page, Debian's security tracker, Red Hat's bulletin), not the upstream version number.
RHEL, AlmaLinux, Rocky: the library package is libbrotli (the brotli package is only the command-line tool and is often not installed):
# Read-only: installed library version, and whether its changelog lists the fix
rpm -q libbrotli
rpm -q --changelog libbrotli | grep -m1 CVE-2026-111497# Real output from the test machine (AlmaLinux 10.2, 9 November 2026)
libbrotli-1.1.0-8.el10_2.1.x86_64
- CVE-2026-111497 brotli: Out-of-Bounds Write in Google Brotli DecoderNo output from the second command means the installed build does not list the fix: run dnf upgrade libbrotli and restart the processes that load it.
Find the processes that still use the old library
After a library update, a program that is already running keeps the old copy in memory until it restarts. This lists the processes that have the shared Brotli decoder loaded:
# Read-only: PIDs and command lines of the processes that have libbrotlidec loaded
grep -l libbrotlidec /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | while read pid; do printf "%s %s\n" "$pid" "$(tr "\0" " " < /proc/$pid/cmdline | cut -c1-60)"; done# Real output from the test machine, with a throwaway Node.js process started for the test (other lines removed)
126479 node -e setInterval(() => {}, 1000)On the test machine a second program, a Python application, was also on the list. That is the point of the check: the library is carried by programs you did not think of as "Brotli users".
Containers and Kubernetes
Tags can move, so record what is running. This pipeline lists the image and its digest for every container of every Pod:
# Read-only: namespace, Pod, container, image and image digest of every container in the cluster
kubectl get pods -A -o json | jq -r '.items[] | .metadata.namespace as $ns | .metadata.name as $pod | .status.containerStatuses[]? | [$ns, $pod, .name, .image, .imageID] | @tsv'# Real output from a kind cluster with one affected and one fixed Pod (filtered with grep node)
default fixed-node fixed-node docker.io/library/node:22.23.4-bookworm-slim docker.io/library/node@sha256:4b150b48b4116e2a22f2c39cc27025fbf4f153e2078fd3b14d159fdb5c7279da
default old-node old-node docker.io/library/node:22.22.1-bookworm-slim docker.io/library/node@sha256:4f77a690f2f8946ab16fe1e791a3ac0667ae1c3575c3e4d0d4589e9ed5bfaf3dThen ask the container itself, with the probe above:
# Read-only: run the Node.js probe inside two running Pods
kubectl exec old-node -- node -p "process.version + ' probe=' + typeof require('zlib').constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH"
kubectl exec fixed-node -- node -p "process.version + ' probe=' + typeof require('zlib').constants.BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH"# Real output from the same cluster
v22.22.1 probe=undefined
v22.23.4 probe=numberAn application's lockfile scan will not see any of this when the decoder is inside the runtime. Check the runtime of every image, including base images that rarely change, and the sidecars and gateways.
Python
# Read-only: the version of the Brotli package in the interpreter your application really uses (repeat with brotlicffi)
/path/to/venv/bin/python -m pip show Brotli | sed -n '1,2p'# Real output from the test machine, in a throwaway virtual environment (first with Brotli 1.2.0, then after the upgrade to 1.2.1)
Name: brotli
Version: 1.2.0
Name: brotli
Version: 1.2.1For a package that is not installed, pip show prints a warning instead. A well-formed round trip (brotli.decompress(brotli.compress(b'hello'))) still worked after the upgrade.
.NET, Bun, Envoy and Istio
These were not run here, because none of them is installed on the test machine. The vendor pages say what to read: dotnet --list-runtimes for framework-dependent .NET applications (self-contained applications and containers carry their own runtime, so inspect the deployed artifact), bun --version for Bun (a compiled executable embeds its own copy), and istioctl version and istioctl proxy-status for Istio, with the proxy image versions for Envoy.
What to do
- Patch the runtime that carries the decoder, using the table above. For Node.js that means a new runtime on a supported line, not an
npmupdate. - Rebuild what embeds a runtime. Container images from a fixed base image, self-contained .NET applications with the fixed runtime, and executables made with
bun build --compilewith Bun 1.4.4 or later. - Update distribution packages from your vendor's advisory, and restart every process that has the library loaded (the check above lists them).
- Restart or redeploy. A running process keeps using the decoder it started with.
- Check that the rollout reached everything: the deployed image digests changed, the old Pods are gone, Istio and Envoy proxies report the fixed version, and the probe or the vendor advisory agrees on every carrier.
A container example, with the base image pinned to a fixed patch release (check that a fixed tag exists for your Node.js line and your base distribution):
# Illustrative: pin the base image to a fixed Node.js patch release, then rebuild with --pull
FROM node:22.23.4-bookworm-slimTemporary mitigations
These reduce exposure while patches roll out. They do not repair the decoder.
- Reject Brotli request bodies at the edge. Red Hat recommends stripping or rejecting
Content-Encoding: brat a reverse proxy or load balancer. An nginx rule that does it (tested with nginx 1.27):
# In a server block: refuse request bodies whose Content-Encoding contains br
if ($http_content_encoding ~* "(^|,)\s*br\s*(,|$)") {
return 415;
}# Real output from the test machine: the HTTP status of a POST with each Content-Encoding header
(no header) 200
br 415
BR 415
gzip, br 415
br, gzip 415
gzip 200
brotli 200This protects only request bodies that pass through that nginx. It does not protect an outbound fetch() that decompresses a hostile response, a browser, a sidecar with its own decoder, or a separate process that decodes files.
- Envoy and Istio: the advisories say only deployments with the Brotli decompressor configured are affected. If you cannot upgrade yet, removing that configuration is the logical stopgap; Envoy's advisory itself lists no workaround, so test the change before you rely on it.
- Bun: the advisory gives
fetch(url, { decompress: false }), which applies to that one request only. It says there is no process-wide workaround. - Node.js and browsers (Red Hat's advice): avoid
zlib.brotliDecompress()andzlib.createBrotliDecompress()on untrusted data until Node.js is updated, and avoid browsing untrusted sites with Firefox and Thunderbird until updated packages ship. - Python: remove the Brotli packages from environments that do not need them.
There is no WAF rule that patches a bundled decoder. An edge rule helps for one path, and the vulnerable code stays in the process.
If you suspect exploitation
Patching does not undo a compromise, and a memory-corruption bug may leave no clean trace.
- Keep the logs of the application, the proxy or load balancer, the runtime, the container and the host before you rotate or rebuild anything.
- Note the vulnerable version, the image digest, the service, when it was exposed and when it was patched.
- Look for workers that crashed or restarted while decompressing Brotli, and match them with request logs and with deployment changes. Failed attempts tend to look like crashes. Request headers show a Brotli content encoding only if you log them, and a clean log is not proof of a clean system.
- If a compromise looks credible, contain the workload, rebuild it from a patched image, and rotate every secret the process could read: service credentials, cloud tokens, deployment secrets and database passwords. Check the systems that trusted it.
Do not test a production system with a public exploit. Check versions, image digests, package changelogs and, for Node.js, the probe above.
What this article does not claim
- The extent of exploitation. CISA lists it as exploited, one attempt was reported by ELLIO and not confirmed by Tenable, and no source names an actor or an attack campaign. Ransomware use is "unknown" in the catalog.
- That the probe works on every build. It was tested on the six official Node.js builds above and on one distribution build, where it gave a false alarm. A custom build, an older line or a different vendor can behave differently.
- The status of any distribution or managed platform today. Red Hat had no fixed packages in its bulletin on 27 October. Re-check the vendor page.
- Anything about products that were not run: .NET, Bun, Envoy, Istio, RPM-based systems and Windows were not tested here.
Related guides
- Install and update Linux packages with apt or dnf: checking what a package really contains before and after an update.
- Manage Linux services with systemctl: restarting a service so it loads the updated code.
- Understand Docker image tags, registries and non-root users: why a new tag upstream does not change a container that is already running.
- Inspect Linux processes with ps, top and pgrep: finding which binary a running process was started from.
Sources
- Node.js, October 2026 security releases: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
- Google Brotli v1.2.1: https://github.com/google/brotli/releases/tag/v1.2.1
- GitHub advisory GHSA-9v8h-qqgm-4m35 (Brotli, PyPI): https://github.com/advisories/GHSA-9v8h-qqgm-4m35
- CISA Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2026-111497
- Red Hat bulletin RHSB-2026-015: https://access.redhat.com/security/vulnerabilities/RHSB-2026-015
- Ubuntu CVE page: https://ubuntu.com/security/CVE-2026-111497
- Debian security tracker: https://security-tracker.debian.org/tracker/CVE-2026-111497
- .NET October 2026 out-of-band security updates: https://devblogs.microsoft.com/dotnet/dotnet-october-2026-oob-security-updates/
- Envoy advisory GHSA-3wvj-j6qm-62mr: https://github.com/envoyproxy/envoy/security/advisories/GHSA-3wvj-j6qm-62mr
- Istio ISTIO-SECURITY-2026-007: https://istio.io/latest/news/security/istio-security-2026-007/
- Bun advisory GHSA-663w-cv8g-jj2p: https://github.com/oven-sh/bun/security/advisories/GHSA-663w-cv8g-jj2p
- Tenable, Brotli2Shell FAQ: https://www.tenable.com/blog/brotli2shell-frequently-asked-questions-for-google-brotli-decoder-cve-2026-111497
- Semgrep, Broccoli2Shell: https://semgrep.dev/blog/2026/broccoli2shell-brotli-cve-2026-111497/
- Aikido, Python packages and Node2Shell: https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497
- Cyber Security Agency of Singapore, alert AL-2026-154: https://www.csa.gov.sg/alerts-and-advisories/alerts/al-2026-154/
More from the blog
- ModSecurity CVE-2026-104269: Upload filename Bypass · Security, 2026-11-14
- SSHole (CVE-2026-123158): Are You In Scope, and Which Account Is the Target? · Security, 2026-11-06
- CVE-2026-114820: eMudhra Java Trust Store Fix · Security, 2026-11-04
This article is educational information, not incident-response or legal advice. Verify package status with your operating system, hosting, or runtime vendor.