Node2Shell (CVE-2026-111497): the Node.js Brotli flaw and how to protect your applications

Vulnerabilidades
25 Oct 2026, 4:56 p.m. By Juan Carlos Hernandez 💬 0
Node2Shell (CVE-2026-111497): the Node.js Brotli flaw and how to protect your applications
Updated October 25, 2026: a public proof of concept is out. If your applications run on Node.js 22, 24 or 26, upgrade.

Node2Shell is the name given to CVE-2026-111497, a high-severity flaw in the Brotli decoder bundled with Node.js. Malicious compressed data can write outside its memory buffer and may lead to code execution on the server. The fix is to upgrade to Node.js 22.23.4, 24.22.1 or 26.12.1, released on October 21, 2026.

What is Node2Shell?

It is an out-of-bounds write in the Brotli decoder that ships with Node.js: malformed compressed input makes the decoder write past the end of a memory buffer. The bug is in the Brotli library (versions 1.0.3 to 1.2.0), fixed in Brotli 1.0.10, 1.1.1 and 1.2.1, so other software that bundles it may be affected too. Node.js rates it high severity and fixed it in its October 21 security release. It was reported by OpenAI Codex Security researchers.

Which Node.js applications are exposed to CVE-2026-111497?

Not every Node.js app: a Node.js HTTP server does not decompress Brotli on its own. The exposed ones decompress attacker-controlled Brotli data, through two paths:

Incoming requests: Express 5 and body-parser 2 decompress bodies sent with Content-Encoding: br when their parsers are configured; any client can send one.
Responses your app fetches: Node.js fetch() decompresses a Brotli response automatically. A malicious or compromised external server (webhooks, user-supplied URLs, integrations) can send one.
Your own code or libraries that pass untrusted data to brotliDecompress or createBrotliDecompress in node:zlib.
Bun before 1.4.4 also ships the affected decoder.

Which Node.js versions fix Node2Shell?

Node.js 26 → upgrade to 26.12.1 or later.
Node.js 24 → upgrade to 24.22.1 or later.
Node.js 22 → upgrade to 22.23.4 or later.
Node.js 25, 23, 20 and older: end of life with no fix: move to 22, 24 or 26.
Containers: rebuild images on a fixed base; the Node.js inside an image is not updated by the host.

Is Node2Shell being exploited?

As of October 22, no in-the-wild exploitation had been reported, but a public proof of concept has existed since that day. Imperva reproduced code execution on Node.js 24.22.0 through both paths (Express and fetch), though not on every attempt, and 24.22.1 rejects the same input. Other analyses note that on standard builds the proof mostly crashes the process and leaks a limited amount of memory. With public code, the window to patch gets shorter.

What should your company do today?

1. Inventory: node --version on servers and CI runners, and docker run --rm <image> node --version for every image; a package inventory misses the Node.js bundled inside an image.
2. Upgrade: move to 22.23.4, 24.22.1 or 26.12.1, rebuild images and redeploy.
3. Where Brotli gets in: npm ls express body-parser to see if you run Express 5 or body-parser 2, search your code for brotliDecompress and createBrotliDecompress, and list fetch() calls to servers you do not control.
4. While you upgrade: reject requests with Content-Encoding: br at the proxy, load balancer or WAF on routes that do not need it (hardly any legitimate client sends Brotli bodies).
5. Signals: treat unexpected Node.js process crashes and decoder errors as leads to investigate, correlated with the runtime version and the source of the data.

How does Rescue WAF protect you while you upgrade Node.js?

A web application firewall does not fix Node.js, but it reduces exposure on the most direct path, incoming requests. In Rescue WAF this is configured per site as a virtual patch:

Blocking bodies with Content-Encoding: br on the routes of your Node.js apps that do not need them, first in monitoring mode so nobody is affected.
Request body size limits and per-IP request limits.
CrowdSec IP reputation to cut off those already scanning.
Logging every attempt, which reaches Rescue SOC as an incident.

The limit is clear: the WAF sees what comes in, not the responses your application fetches with fetch() from other servers. Only upgrading Node.js closes that path.

What does Rescue SOC add against Node2Shell?

Vulnerability inventory: agents report each server's software, so servers running an affected Node.js are found and internet-facing ones go first.
Detection: alerts when the Node.js process runs commands or shells, new files appear in the application folders or unusual outbound connections show up.
Correlation with Rescue WAF: a blocked attempt at the WAF plus odd activity on the same server becomes a priority case.
Analyst-led response: the alert is validated, the host is contained and every action is documented.

Learn about Rescue SOC. If you suspect a server is already compromised, call our 24/7 incident response; after upgrading, a penetration test confirms the fix was applied. This week also brought PHP2Shell, the critical PHP flaw: if you run both languages, check both.

Node2Shell frequently asked questions

What is Node2Shell?

It is the name of CVE-2026-111497, a high-severity flaw in the Brotli decoder bundled with Node.js: malicious compressed data writes outside its memory buffer and may lead to code execution. It was fixed on October 21, 2026.

Is my Node.js application vulnerable to CVE-2026-111497?

Only if it decompresses attacker-controlled Brotli data: request bodies with Content-Encoding: br (for example with Express 5 or body-parser 2), responses it fetches with fetch() from servers you do not control, or code that runs brotliDecompress on untrusted data. A Node.js HTTP server without any of that is not affected.

Which Node.js version should I upgrade to?

22.23.4, 24.22.1 or 26.12.1, or later in each line. Node.js 20, 23 and 25 are end of life and will not get a fix.

Are Next.js or Express vulnerable?

The flaw is in Node.js, not the framework. Express 5 and body-parser 2 open the request path for Brotli; any app that uses fetch() against external servers opens the response path. Either way, the fix is to upgrade Node.js.

Is a WAF enough to protect against Node2Shell?

No. A WAF can block requests with Content-Encoding: br, but it does not see the responses your application fetches with fetch(). You must upgrade Node.js.

Is it being exploited?

As of October 22, 2026 no in-the-wild exploitation had been reported, but a public proof of concept has been available since that day.

Sources

  1. Aikido Security. Node2Shell: Node.js Brotli RCE (CVE-2026-111497). 2026 https://www.aikido.dev/blog/node2shell-nodejs-brotli-rce-cve-2026-111497
  2. Imperva. Node2Shell: From Brotli Data to Remote Code Execution. 2026 https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/
  3. Vercel. Node.js security advisory: Brotli decoder RCE (CVE-2026-111497). 2026 https://vercel.com/kb/bulletin/node-js-security-advisory
  4. SOC Prime. CVE-2026-111497: Node.js Brotli Decoder Flaw Enables Remote Code Execution. 2026 https://socprime.com/blog/cve-2026-111497-node-js-brotli-decoder-flaw-enables-remote-code-execution/

Do you have Node.js applications exposed to the internet?

We help you inventory them, apply the virtual patch in Rescue WAF and watch them with Rescue SOC while you upgrade.

Talk to a specialist

You may also like

Comments (0)

Be the first to comment.