---
title: "Node2Shell (CVE-2026-111497): affected Brotli and Node.js versions, the patch, mitigations"
description: "Node2Shell is an out-of-bounds write in Google's Brotli decoder, CVE-2026-111497, exploited in the wild. Google Brotli 1.0.3 through 1.2.0 are affected; fixed in 1.0.10, 1.1.1 and 1.2.1. Node.js is fixed in 22.23.4, 24.22.1 and 26.12.1. Affected versions, the fix commit, how to check a host, and what to do until you patch."
cve: [CVE-2026-111497]
published: 2026-11-24
updated: 2026-11-24
canonical: https://yeet.cx/cve/CVE-2026-111497
---

# Node2Shell (CVE-2026-111497)

Node2Shell is the name for CVE-2026-111497, an out-of-bounds write in google's brotli decoder that lets anyone who can get a program to decompress a crafted brotli stream crash it, read its memory or run code in it.

**what to do:** update the brotli your software uses to **1.0.10, 1.1.1 or 1.2.1**, then restart the process and rebuild any image that carries it. for node.js that means **22.23.4, 24.22.1 or 26.12.1**; for bun 1.4.4; for the PyPI packages `brotli` 1.2.1 and `brotlicffi` 1.2.1.0. end-of-life lines get no fix, so move off them.

- **severity:** 9.2 critical (CVSS 4.0)
- **access needed:** network, no login (anyone whose brotli data the target decompresses)
- **exploited:** in the wild, on CISA's KEV list since 27 oct 2026; first exploit traffic seen 26 oct 2026
- **install:** node.js 26.12.1, 24.22.1 or 22.23.4; brotli 1.2.1, 1.1.1 or 1.0.10; bun 1.4.4

## what is Node2Shell?

a brotli stream is split into blocks, and the decoder switches between block types as it reads. a crafted stream declares a single block type for a kind and then asks the decoder to switch, which is not valid brotli. before the fix the helper `DecodeBlockTypeAndLength()` returned a plain boolean, so a caller could not tell an invalid stream from one that merely needed more input. the streaming decoder read the invalid switch as "need more input" and kept appending the attacker's bytes to an eight-byte internal buffer, writing past its end (CWE-252 is the bug, CWE-787 is what it causes).

the write lands in the decoder's own `BrotliDecoderState`, next to `buffer_length`, `pos`, the distance limits and the ring-buffer pointer. by mozilla's analysis an attacker who controls the stream overwrites those fields and reaches a controlled heap write through `memmove16(&s->ringbuffer[pos], ...)`, which is a route to code execution. google's record pairs the two CWEs exactly.

the flaw is in google's reference C decoder, not in any one product. node.js and bun bundle their own copy; browsers, proxies, .NET, the PyPI `brotli`/`brotlicffi` packages, `libcurl` and many archive and font tools ship or link it. a program is only exposed when it actually decompresses brotli data an attacker controls. decoders rewritten in other languages (the java, javascript, C# and rust ports) do not reach the C bug; the go port had the same logic error but only crashed.

### CVE-2026-111497

- advisory: Brotli: Out-of-bounds write in the Brotli decoder ("Node2Shell") also affects the PyPI Brotli package ([GHSA-9v8h-qqgm-4m35](https://github.com/advisories/GHSA-9v8h-qqgm-4m35))
- CISA calls it: Google Brotli Unchecked Return Value Vulnerability
- what goes wrong: a crafted stream declares one block type and then asks the decoder to switch block types, which cannot happen. the block-switch helper returned a plain `BROTLI_FALSE`, which the streaming decoder read as "need more input" rather than "invalid stream". it kept appending the attacker's bytes to an eight-byte internal buffer and wrote past the end, corrupting the decoder's own state.
- how it is reached: one crafted brotli stream that an application decompresses. the confirmed route is an HTTP body or response coded `Content-Encoding: br`; the public exploit stream for node.js runs about 23 MB, and the full browser chain in the mozilla report is about 22 MB in two network chunks.
- confirmed on: code execution was shown on the official node.js 24.22.0 image, on arm64 by imperva and on x86-64 by ELLIO across a bare `node:http` server, express 5 and koa. the firefox copy of the decoder reached a controlled heap write by source analysis and sanitizer testing. for the python packages, researchers reproduced the fault but did not attempt code execution.
- CVSS 4.0: 9.2 critical, scored by google (the CNA), `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- CVSS 3.1: 9.8 critical, scored by NVD, `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CVSS 3.1: 8.1 important, scored by red hat, `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`

weakness classes: CWE-787 Out-of-bounds Write, CWE-252 Unchecked Return Value.

## is Node2Shell being exploited?

### timeline

- 2026-02-27: Evgenii Kliuchnikov commits the fix to google/brotli master as 0ed4268a, "Detect and report invalid stream earlier", with no release and no advisory. it stays publicly readable for eight months. ([google/brotli](https://github.com/google/brotli/commit/0ed4268a4401abcb4472096340477cf4af7d1a2b))
- 2026-04-05: an automated, AI-assisted report filed through mozilla's bugmon account describes the same heap overflow in firefox's vendored brotli (bug CVE-2026-111497 / 2029458, sec-high), with a full exploit-chain writeup. ([mozilla](https://bugzilla.mozilla.org/show_bug.cgi?id=CVE-2026-111497))
- 2026-04-09: mozilla updates its bundled brotli past the fix and ships it to firefox 150, ESR 140.10 and ESR 115.35. ([mozilla](https://bugzilla.mozilla.org/show_bug.cgi?id=CVE-2026-111497))
- 2026-10-21 10:38 UTC: node.js publishes 22.23.4, 24.22.1 and 26.12.1, carrying the cherry-picked brotli fix, and the advisory for CVE-2026-111497. google releases brotli 1.0.10, 1.1.1 and 1.2.1 at about 19:27 UTC, each naming the CVE. ([node.js](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases))
- 2026-10-22: the CVE record is published; imperva demonstrates code execution on the official node.js 24.22.0 arm64 image; a public PoC is on github (broccoli2shell.com's date; the first repository naming the CVE appeared on 21 october); bun 1.4.4 ships the fix. ([imperva](https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/))
- 2026-10-25: microsoft ships out-of-band .NET updates (runtime 8.0.33, 9.0.22, 10.0.14) for its bundled brotli. ([microsoft](https://github.com/dotnet/announcements/issues/494))
- 2026-10-26 15:08 UTC: ELLIO records a 23 MB brotli request body built to attack node.js 24.22.0 on x86-64, from 94.154.43.7, the first exploit attempt seen in the wild. ([ellio](https://ellio.tech/en/blog/node2shell-cve-2026-111497-rce-on-stock-nodejs-builds/))
- 2026-10-27: CISA adds CVE-2026-111497 to its known exploited vulnerabilities catalog, due 10 november. ([CISA](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-111497))
- 2026-11-09: apple fixes its copy of the decoder across iOS, iPadOS, macOS, watchOS and visionOS, according to the broccoli2shell.com tracker. ([broccoli2shell.com](https://broccoli2shell.com/))

yes. CISA added CVE-2026-111497 to its [known exploited vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-111497) on 27 october 2026, with a 10 november deadline for US federal agencies, after exploit traffic was seen in the wild. EPSS is 0.99931 as of 23 november 2026.

imperva's red team (Ron Masas) demonstrated code execution on 22 october against the official node.js 24.22.0 arm64 image, through both a `fetch()` response and an express 5 request body, and confirmed 24.22.1 rejects the same input. the exploit did not succeed on every attempt, and imperva did not release it ([sysdig](https://www.sysdig.com/blog/node2shell-cve-2026-111497-detecting-the-node-js-brotli-rce)).

[ELLIO](https://ellio.tech/en/blog/node2shell-cve-2026-111497-rce-on-stock-nodejs-builds/) reproduced code execution on x86-64 across a bare `node:http` server, the `node:24.22.0-slim` image, express 5.3.0 and koa 3, each returning a shell as the service account. it reports a public exposure checker (`node2shell-check`, user agent `Mozilla/5.0 (compatible; node2shell-check/1.0)`) reaching its sensors first, and on 26 october 2026 at 15:08 UTC a 23,069,983-byte brotli-coded request body built to attack node.js 24.22.0 on x86-64, from 94.154.43.7 (an IP ELLIO rates malicious, tied to PHP2Shell exploitation). that first live attempt failed in ELLIO's own tests.

the exploit is build-specific. an offset that gave a shell on 24.22.0 gave nothing in 10,000 attempts against 22.23.3 and 26.12.0, each of which needs its own offset. a miss crashes the worker, so a failed attempt is a denial of service and, where core dumps are written, a route to another request's in-memory secrets.

public proof-of-concept code is on github (the first repository appeared on 21 october, about five hours after the fix). the earliest public PoC reached code execution only on a deliberately weakened build; later labs report probabilistic code execution on the official 24.22.0 x86-64 image. reliability depends on the build, concurrency and memory layout; some reports held that only denial of service is reliable.

## the yeet programmable firewall

the upgrade is the fix. until it lands, the yeet programmable firewall blocks the request on the host, in the network driver, with no restart.

[book a demo](https://yeet.cx/demo), or [learn more](https://yeet.cx/discover/programmable-firewall) about the yeet programmable firewall.

## which brotli and node.js versions are affected, and which fix it?

the root bug is in the brotli library, and every product that bundles or links an affected copy has to ship its own update. install the brotli release for your branch, and the runtime release that carries it.

| branch | vulnerable | first fixed | install now |
| --- | --- | --- | --- |
| brotli 1.2 | 1.2.0 | 1.2.1 | 1.2.1 |
| brotli 1.1 | 1.1.0 | 1.1.1 | 1.1.1 |
| brotli 1.0 | 1.0.3 to 1.0.9 | 1.0.10 | 1.0.10 |

- brotli 1.0: the bug was introduced in 1.0.3; releases 1.0.0 through 1.0.2 predate it.

| branch | vulnerable | first fixed | install now |
| --- | --- | --- | --- |
| node.js 26 | 26.0.0 to 26.12.0 | 26.12.1 | 26.12.1 |
| node.js 24 | 24.0.0 to 24.22.0 | 24.22.1 | 24.22.1 |
| node.js 22 | 22.0.0 to 22.23.3 | 22.23.4 | 22.23.4 |
| node.js 25, 23, 20 and older (end of life) | all releases | no node.js release | move to 22, 24 or 26 |

- node.js 25, 23, 20 and older: the end-of-life 25.x, 23.x and 20.x lines bundle an affected brotli and get no fix. move to a supported line.

| branch | vulnerable | first fixed | install now |
| --- | --- | --- | --- |
| bun 1.x | 1.4.3 and earlier | 1.4.4 | 1.4.4 |

- bun 1.x: `bun build --compile` executables stay affected until rebuilt on 1.4.4.

### distribution packages

distributions patch their own `brotli` package, and where a product links the system library the distribution's update is what fixes it. some keep the old upstream version number, so the version string cannot prove the fix.

| distribution | package | first fixed package | version number | advisory |
| --- | --- | --- | --- | --- |
| debian 13 (trixie) | brotli | 1.1.0-2+deb13u1 | stays the same | [DSA-6582-1](https://www.debian.org/security/2026/dsa-6582) |
| debian 12 (bookworm) | brotli | 1.0.9-2+deb12u1 | stays the same | [DLA-4855-1](https://lists.debian.org/debian-lts-announce/2026/10/msg00049.html) |
| ubuntu 24.04 | brotli | 1.1.0-2ubuntu0.1 | stays the same | [USN-8956-1](https://ubuntu.com/security/notices/USN-8956-1) |
| ubuntu 22.04 | brotli | 1.0.9-2ubuntu0.1 | stays the same | [USN-8956-1](https://ubuntu.com/security/notices/USN-8956-1) |
| RHEL 10 | brotli | 1.1.0-8.el10_2.1 | stays the same | [RHSA-2026:90449](https://access.redhat.com/errata/RHSA-2026:90449) |
| RHEL 9 | brotli | 1.0.9-10.el9_8.1 | stays the same | [RHSA-2026:90495](https://access.redhat.com/errata/RHSA-2026:90495) |
| RHEL 8 | brotli | 1.0.6-5.el8_10 | stays the same | [RHSA-2026:90501](https://access.redhat.com/errata/RHSA-2026:90501) |

## how do I check whether my node.js is patched?

check the brotli that the program decoding untrusted data actually uses. a node.js version number alone can mislead, so confirm the release and, where the system library is linked, the package.

### read the node.js version

the fixed node.js releases bundle the fixed brotli. a release at or above the fix for your line is patched; an earlier one, or any end-of-life line, is not.

host:

```sh
node --version
```

container:

```sh
docker run --rm --entrypoint node <image> --version
```

- vulnerable: `v24.22.0`
- fixed: `v24.22.1`

tested: we read both strings from the official `node:24.22.0-slim` and `node:24.22.1-slim` images on 23 november 2026.

### do not trust process.versions.brotli on node.js

node.js cherry-picked the fix without bumping the bundled brotli version string. a patched 24.x and an unpatched one both report `1.2.0`, so this value cannot tell you whether the fix is in. use the node.js release version instead.

```sh
node -p process.versions.brotli
```

- 24.22.0 (unpatched): `1.2.0`
- 24.22.1 (patched): `1.2.0`

tested: we ran it in the official slim images on 23 november 2026: 22.23.3 and 22.23.4 both print `1.1.0`; 24.22.0, 24.22.1, 26.12.0 and 26.12.1 all print `1.2.0`.

### ask the runtime whether it carries the fix

the fix adds one error code to the decoder, and node.js exposes it as a `zlib` constant. a build that has the constant has the fix. the command reads a constant and decodes nothing, so it is safe on a production host.

host:

```sh
node -p "'BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH' in require('zlib').constants"
```

container:

```sh
docker run --rm --entrypoint node <image> -p "'BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH' in require('zlib').constants"
```

- fixed: `true`
- not fixed: `false`

tested: we ran it in the official slim images on linux arm64 on 23 november 2026: `false` on 22.23.3, 24.22.0 and 26.12.0, `true` on 22.23.4, 24.22.1 and 26.12.1. a distribution build of node.js that links the system brotli can print `false` on a patched host, so check the package there.

### check the python packages

the PyPI `brotli` and `brotlicffi` packages bundle the decoder, and HTTP clients use them when installed. the distribution package `python3-brotli` is a different build, fixed through your distribution.

```sh
pip show brotli brotlicffi
```

- vulnerable: `Name: Brotli
Version: 1.2.0`
- fixed: `Name: Brotli
Version: 1.2.1`

tested: fixed versions per the github advisory GHSA-9v8h-qqgm-4m35: `brotli` 1.2.1 and `brotlicffi` 1.2.1.0. the command itself is untested on our side.

### check the system brotli library

where a program links the system library (debian's node.js, `libcurl`, many bindings) the distribution's `brotli` package is what fixes it. the upstream version string may not move on a backport, so read the package version and changelog.

debian, ubuntu:

```sh
dpkg -l | grep -i brotli
```

RHEL, fedora:

```sh
rpm -qa | grep -i brotli
```

- patched (ubuntu 24.04): `libbrotli1   1.1.0-2ubuntu0.1`
- not patched (ubuntu 24.04): `libbrotli1   1.1.0-2build2`

tested: fixed package versions from ubuntu USN-8956-1 and the debian tracker. the commands are untested on our side; confirm the fixed version against your distribution's advisory.

### restart and rebuild

a running process keeps the old decoder in memory until it restarts, and a container keeps it until you rebuild the image on a patched base. a floating tag such as `node:24` serves the cached old version until you pull.

```sh
docker build --pull -t <image> .
```

## the patch

one small commit fixes the bug. it was written on 27 february 2026 as master commit `0ed4268a`, "Detect and report invalid stream earlier", and sat in the public tree for eight months before the october releases cherry-picked it onto the three branches. the excerpts below are copied from the 1.2 branch commit `b418fa8`, which changes two files, adding 60 lines and removing 33, with no test files.

the block-switch helpers now return a `BrotliDecoderErrorCode` instead of a boolean. an invalid switch (one block type declared, so nothing to switch to) returns the new error `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH`, value -17, and the decoder stops. a genuine shortfall of input still returns `BROTLI_DECODER_NEEDS_MORE_INPUT`, so the two conditions no longer share one answer.

a new macro, `BROTLI_SAFE_WITH_STATUS`, carries the error code out to the caller and jumps to `saveStateAndReturn` on anything other than success, in place of the old `BROTLI_SAFE`, which could only tell success from "need more input".

### c/include/brotli/decode.h (CVE-2026-111497, +1 -3)

the fix claims the reserved -17 slot for a new format error, `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH`. before the fix this code did not exist, so a build that knows it carries the fix.

```diff
@@ -85,9 +85,7 @@ typedef enum {
   BROTLI_ERROR_CODE(_ERROR_FORMAT_, PADDING_1, -14) SEPARATOR              \
   BROTLI_ERROR_CODE(_ERROR_FORMAT_, PADDING_2, -15) SEPARATOR              \
   BROTLI_ERROR_CODE(_ERROR_FORMAT_, DISTANCE, -16) SEPARATOR               \
-                                                                           \
-  /* -17 code is reserved */                                               \
-                                                                           \
+  BROTLI_ERROR_CODE(_ERROR_FORMAT_, BLOCK_SWITCH, -17) SEPARATOR           \
   BROTLI_ERROR_CODE(_ERROR_, COMPOUND_DICTIONARY, -18) SEPARATOR           \
```

### c/dec/decode.c (CVE-2026-111497, +59 -30)

`DecodeBlockTypeAndLength` now returns an error code. for a single declared block type it returns the hard `BLOCK_SWITCH` error instead of `BROTLI_FALSE`, so the streaming loop no longer mistakes an invalid stream for one that needs more input. the new `BROTLI_SAFE_WITH_STATUS` macro propagates that error to the caller.

```diff
@@ -1176,7 +1176,7 @@ static BrotliDecoderErrorCode DecodeContextMap(brotli_reg_t context_map_size,
 
 /* Decodes a command or literal and updates block type ring-buffer.
    Reads 3..54 bits. */
-static BROTLI_INLINE BROTLI_BOOL DecodeBlockTypeAndLength(
+static BROTLI_INLINE BrotliDecoderErrorCode DecodeBlockTypeAndLength(
     int safe, BrotliDecoderState* s, int tree_type) {
@@ -1187,7 +1187,7 @@ static BROTLI_INLINE BROTLI_BOOL DecodeBlockTypeAndLength(
   brotli_reg_t* ringbuffer = &s->block_type_rb[tree_type * 2];
   brotli_reg_t block_type;
   if (max_block_type <= 1) {
-    return BROTLI_FALSE;
+    return BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH;
   }
@@ -1952,6 +1963,22 @@ static BROTLI_INLINE BROTLI_BOOL CheckInputAmount(
 
+/* NB: METHOD should return BROTLI_DECODER_SUCCESS, BROTLI_DECODER_ERROR_*, or
+   BROTLI_DECODER_NEEDS_MORE_INPUT; the later two break the processing. */
+#define BROTLI_SAFE_WITH_STATUS(METHOD)         \
+  {                                             \
+    BrotliDecoderErrorCode status;              \
+    if (safe) {                                 \
+      status = Safe##METHOD;                    \
+    } else {                                    \
+      status = METHOD;                          \
+    }                                           \
+    if (status != BROTLI_DECODER_SUCCESS) {     \
+      result = status;                          \
+      goto saveStateAndReturn;                  \
+    }                                           \
+  }
@@ -1991,7 +2018,7 @@ static BROTLI_INLINE BrotliDecoderErrorCode ProcessCommandsInternal(
     goto saveStateAndReturn;
   }
   if (BROTLI_PREDICT_FALSE(s->block_length[1] == 0)) {
-    BROTLI_SAFE(DecodeCommandBlockSwitch(s));
+    BROTLI_SAFE_WITH_STATUS(DecodeCommandBlockSwitch(s));
     goto CommandBegin;
@@ -2330,7 +2357,7 @@ static BROTLI_INLINE BrotliDecoderErrorCode ProcessCommandsInternal(
 NextLiteralBlock:
-  BROTLI_SAFE(DecodeLiteralBlockSwitch(s));
+  BROTLI_SAFE_WITH_STATUS(DecodeLiteralBlockSwitch(s));
   goto CommandInner;
```

### what changes for you after the upgrade

- a new public error constant, `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (-17). node.js exposes it as `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` and returns it to the application; a crafted request now fails fast with that error (node.js answers an inbound request with a 400).
- no behaviour change for valid streams. the fix rejects input that was already malformed; well-formed brotli decodes as before.

## how do I detect Node2Shell attempts?

no single signal is proof. a crash or a rise in HTTP 5xx is a lead, not evidence; a successful exploit may leave no crash, and each request shape below has legitimate uses.

- (request) a request body or response carrying `Content-Encoding: br` into a service that decodes it. match `br` case-insensitively, and inside a list such as `gzip, br`. legitimate clients and servers also send brotli-coded bodies.

  ```
  Content-Encoding: br
  ```

- (request) an unusually large brotli request body. the public node.js exploit stream runs about 23 MB; the browser chain in the mozilla report is about 22 MB. size alone proves nothing; many brotli bodies are small and many large bodies are benign.
- (log) unexpected worker crashes or restarts, or node.js answering `ERR__ERROR_FORMAT_BLOCK_SWITCH` / HTTP 400 on a patched build, right after a brotli request. where core dumps are enabled, a crash can write another request's secrets to `/var/lib/systemd/coredump`.

  ```
  ERR__ERROR_FORMAT_BLOCK_SWITCH
  ```

- (process) a shell, downloader or network redirection started by the node.js or web-server account, such as `/bin/sh` wired to a socket, `curl` or `wget`. this is evidence the attack already worked; the host needs incident response, not a filter.

### public detection rules

| rule set | rules | source |
| --- | --- | --- |
| microsoft azure WAF | DRS 2.2 rule 920450 (restricted headers, adds Content-Encoding) | [microsoft](https://techcommunity.microsoft.com/blog/AzureNetworkSecurityBlog/protect-against-brotli-cve-2026-111497-with-azure-web-application-firewall-waf/4567288) |
| sysdig secure | Node.js Process Crash Followed by In-Place Program Execution; Node.js Process Redirected Network Socket to Standard Stream | [sysdig](https://www.sysdig.com/blog/node2shell-cve-2026-111497-detecting-the-node-js-brotli-rce) |

## what can I do if I can't upgrade node.js yet?

node.js and the brotli project publish no in-runtime workaround, so the upgrade is the fix. each stopgap below closes one path and leaves others open, so stack the ones that fit and patch anyway.

| stopgap | closes | leaves open | source |
| --- | --- | --- | --- |
| reject `Content-Encoding: br` on inbound requests at the proxy, load balancer or WAF | the inbound request-body path, for traffic that crosses the edge | brotli responses your own code fetches, service-to-service traffic, and requests that reach the origin directly. match `br` case-insensitively, including inside a list such as `gzip, br` | [red hat (RHSB-2026-015)](https://access.redhat.com/security/vulnerabilities/RHSB-2026-015) |
| turn off brotli inflation in the body parser (`express.json({ inflate: false })`) | compressed request bodies reaching the node.js decoder through that parser | the `fetch()` response path, direct `node:zlib` calls, and it also rejects gzip and deflate bodies | [sysdig](https://www.sysdig.com/blog/node2shell-cve-2026-111497-detecting-the-node-js-brotli-rce) |
| uninstall the PyPI `brotli` and `brotlicffi` packages | brotli decoding by `urllib3`/`requests`, `httpx`, `aiohttp` and scrapy, which only use it when installed | any code that still imports a brotli decoder directly, and the distribution's `python3-brotli` | [broccoli2shell.com](https://broccoli2shell.com/) |
| disable only the brotli decompressor filter in envoy and istio | brotli decompression at the proxy, both directions | any downstream decoder the proxy forwards encoded bytes to; keep gzip and zstd filters | [patch the planet](https://patchtheplanet.org/brotli) |
| disable automatic brotli response decompression in HTTP clients | the outbound path, where your code fetches an attacker-influenced URL | inbound request bodies, and a server can send brotli even when you drop `br` from `Accept-Encoding`, so reject the response before decoding it | [patch the planet](https://patchtheplanet.org/brotli) |
| turn on your edge WAF's Node2Shell rule | known request shapes that cross the edge (microsoft's rule 920450 restricts `Content-Encoding`; [vercel and other providers](https://broccoli2shell.com/) deployed rules on disclosure day) | responses your app fetches, direct-to-origin traffic, and encodings the rule does not name. check whether the rule logs or blocks | [microsoft](https://techcommunity.microsoft.com/blog/AzureNetworkSecurityBlog/protect-against-brotli-cve-2026-111497-with-azure-web-application-firewall-waf/4567288) |

## Node2Shell questions

### what is Node2Shell (CVE-2026-111497)?

Node2Shell is an out-of-bounds write in google's brotli decoder. a crafted brotli stream that a program decompresses can corrupt the decoder's memory, which can crash it, leak its memory or run code. the bug is in the C library, not in one product, so node.js, bun, python packages, .NET, browsers and proxies that bundle or link an affected copy are all exposed. it is also called Broccoli2Shell and HTTP2Shell.

### which brotli and node.js versions fix Node2Shell?

google brotli 1.0.10, 1.1.1 and 1.2.1 fix it. node.js carries the fix in 22.23.4, 24.22.1 and 26.12.1; bun in 1.4.4; the PyPI packages in `brotli` 1.2.1 and `brotlicffi` 1.2.1.0. end-of-life node.js lines (25.x, 23.x, 20.x) get no fix, so move to a supported line.

### I'm on node.js and process.versions.brotli says 1.2.0. am I patched for Node2Shell?

that value cannot tell you. node.js cherry-picked the fix without changing the bundled brotli version string, so a patched 24.x and an unpatched one both print `1.2.0`. check the node.js release instead: 24.22.1 and later on the 24.x line are patched, 24.22.0 and earlier are not. on an official build you can also ask the runtime: `node -p "'BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH' in require('zlib').constants"` prints `true` when the fix is in.

### does Node2Shell need the attacker to be logged in?

no. the bug is reached while a program decompresses brotli data, before any application login. any client that can send a request the server decodes, or any server whose brotli response your code fetches, can reach it.

### does a bare node.js HTTP server decode brotli request bodies?

no. a plain `node:http` server does not inflate an incoming brotli body on its own. something has to hand the bytes to the decoder: express 5 or body-parser 2 parsers, the koa body parsers, `@fastify/compress` with request decompression, a `fetch()` of an attacker-influenced URL (undici decodes brotli responses), or a direct `node:zlib` brotli call. express 4 and body-parser 1.x do not decode brotli request bodies.

### are python and .NET affected by Node2Shell?

yes. the PyPI `brotli` (fixed 1.2.1) and `brotlicffi` (fixed 1.2.1.0) packages bundle the same decoder, and `requests`, `httpx` and `aiohttp` use it when installed. microsoft shipped .NET fixes (runtime 8.0.33, 9.0.22, 10.0.14); in .NET, brotli decoding is off by default, so only applications that enable request decompression, `HttpClient` brotli decompression or `BrotliStream`/`BrotliDecoder` are exposed. researchers did not demonstrate code execution in the python packages.

### is Node2Shell being exploited?

yes. CISA added it to its known exploited vulnerabilities catalog on 27 october 2026. ELLIO recorded a crafted exploit request in the wild on 26 october from an IP tied to mass exploitation, though that first attempt failed in its tests. code execution has been reproduced on the official node.js 24.22.0 image, and public proof-of-concept code exists.

### does a WAF or rejecting Content-Encoding: br protect me from Node2Shell?

partly, for inbound requests that cross the edge. rejecting `Content-Encoding: br` at a proxy closes the request-body path, matched case-insensitively and inside lists such as `gzip, br`. it does not cover a brotli response your own code fetches, service-to-service traffic, or requests that reach the origin directly. keep the rule on and upgrade.

### do I need to restart or rebuild after patching Node2Shell?

yes. a running process keeps the old decoder in memory until it restarts, and a container keeps it until you rebuild the image on a patched base and redeploy. `bun build --compile` executables stay affected until rebuilt. a Dockerfile pinned to `node:24.22.0` stays vulnerable until you move the pin.

### why are there three names: Node2Shell, Broccoli2Shell and HTTP2Shell?

they are one CVE, CVE-2026-111497. imperva's red team named it Node2Shell in its 22 october write-up, and by 28 october it was also tracked as HTTP2Shell. Broccoli2Shell is Juliano Rizzo's name, on the view that the flaw is in brotli itself and reaches well beyond node.js. github's advisory uses Node2Shell; the CVE record and brotli release notes use none of the names.

### how was Node2Shell found and when was it fixed?

openai codex security (Khai Tran and Sylvie Mayer) reported it to node.js. the root-cause fix was already written in google/brotli on 27 february 2026, before anyone knew it was a security bug, and sat in the public tree for eight months until the october releases carried it. an automated, AI-assisted report to mozilla described the same overflow in firefox in april 2026.

## sources

- [node.js security advisory: brotli decoder out-of-bounds write permits remote code execution](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases#nodejs-brotli-decoder-out-of-bounds-write-permits-remote-code-execution-cve-2026-111497---high): the runtime advisory and credits
- [github advisory GHSA-9v8h-qqgm-4m35](https://github.com/advisories/GHSA-9v8h-qqgm-4m35): reviewed advisory; PyPI brotli and brotlicffi
- [google/brotli: Detect and report invalid stream earlier](https://github.com/google/brotli/commit/0ed4268a4401abcb4472096340477cf4af7d1a2b): the fix as first written, master commit 0ed4268a
- [google/brotli release v1.2.1](https://github.com/google/brotli/releases/tag/v1.2.1): names CVE-2026-111497 as the security fix
- [CVE record CVE-2026-111497 (google CNA)](https://www.cve.org/CVERecord?id=CVE-2026-111497): affected ranges, CWEs, credits
- [mozilla bug CVE-2026-111497 (2029458)](https://bugzilla.mozilla.org/show_bug.cgi?id=CVE-2026-111497): full root-cause and exploit-chain analysis in firefox's copy
- [CISA known exploited vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-111497): added 27 oct 2026, due 10 nov
- [NVD: CVE-2026-111497](https://nvd.nist.gov/vuln/detail/CVE-2026-111497): CVSS 3.1 9.8; CPE ranges for node.js, .NET, envoy, istio and more
- [red hat RHSB-2026-015](https://access.redhat.com/security/vulnerabilities/RHSB-2026-015): CVSS 3.1 8.1 (important); conditions and product impact
- [debian security tracker: CVE-2026-111497](https://security-tracker.debian.org/tracker/CVE-2026-111497): package versions; notes node.js uses the system brotli
- [ubuntu CVE-2026-111497](https://ubuntu.com/security/CVE-2026-111497): package versions; node.js not-affected since jammy (system brotli)
- [imperva: Node2Shell, from brotli data to remote code execution](https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/): first code-execution demonstration on an official image
- [ELLIO: Node2Shell on stock node.js builds](https://ellio.tech/en/blog/node2shell-cve-2026-111497-rce-on-stock-nodejs-builds/): x86-64 reproduction, per-build offset, first in-the-wild traffic
- [patch the planet (openai): brotli](https://patchtheplanet.org/brotli): cross-ecosystem advisory and per-stack mitigations
- [broccoli2shell.com](https://broccoli2shell.com/): independent tracker of products that bundle brotli
- [cycode: node2shell / HTTP2Shell](https://cycode.com/blog/node2shell-cve-2026-111497/): exposure paths, .NET detail, mitigations
- [sysdig: detecting the node.js brotli RCE](https://www.sysdig.com/blog/node2shell-cve-2026-111497-detecting-the-node-js-brotli-rce): runtime detection and the demonstrated-vs-claimed split

## changelog and credits

- 2026-11-24: page published. facts checked against the node.js advisory, the google/brotli fix commit and releases, the CVE record, NVD, the github advisory, red hat, debian and ubuntu trackers, the mozilla bug and CISA KEV catalog 2026.11.23. version checks run in the official node.js images.

reported by `Khai Tran` and `Sylvie Mayer` of `OpenAI Codex Security`, and fixed in node.js by `Matteo Collina` and `Antoine du Hamel`, as the node.js advisory credits them; the CVE record credits the reporters. the upstream brotli fix was written by `Evgenii Kliuchnikov`. an automated, AI-assisted report filed through mozilla's bugmon account described the same overflow in firefox independently.

this page is maintained by yeet, which makes the yeet programmable firewall. we are not affiliated with google, node.js or the researchers. [tell us](https://yeet.cx/contact) if something here is wrong.
