Back to blog
Node.jsBrotliRCEfetchCVE-2026-111497

Node2Shell: the Node.js Brotli flaw (CVE-2026-111497) and nine other CVEs fixed on October 21

Published on 2026-10-22 · Updated on 2026-10-246 min readCleanIssue

> TL;DR: On October 21, 2026, Node.js released v22.23.4, v24.22.1 and v26.12.1, fixing ten CVEs. The worst, CVE-2026-111497 (nicknamed Node2Shell), is an out-of-bounds write in the bundled Brotli decoder. An application that decompresses attacker-controlled Brotli data can crash, leak memory or execute code. Node.js 20 and older will not get a fix.

The mechanism

According to the Node.js advisory, an invalid block switch was treated as a temporary need for more input instead of a format error. The decoder kept appending bytes to an eight-byte internal buffer. Google, which maintains Brotli, gives it a CVSS 4.0 score of 9.2 and released Brotli 1.0.10, 1.1.1 and 1.2.1. Any software bundling a vulnerable Brotli version is affected, beyond Node.js.

Who is exposed

A Node.js application is exposed only if it, or a library it uses, decompresses Brotli data coming from an attacker. Imperva tested two routes:

  • fetched responses: Node.js's built-in fetch() reading a Brotli-compressed response from a hostile server;
  • received request bodies: Express 5.0.0 to 5.3.0 and body-parser 2.0.0 to 2.3.0, with the raw() and json() parsers.
  • Updating Express or body-parser does not help. The flaw lives in the runtime: only a fixed Node.js release resolves it.

    Where exploitation stands

    Imperva achieved code execution in the lab after several attempts. One public proof of concept reached code execution only on a deliberately weakened build. As of October 23, no in-the-wild exploitation is reported and the CVE is not in CISA's KEV catalog.

    Other fixes not to miss

  • Three high-severity TLS and DNS validation flaws (CVE-2026-105482, 105483, 106069), relevant to any service opening outbound TLS connections.
  • CVE-2026-106074: crypto.randomUUID() and randomInt() can repeat values in startup snapshots and single executable applications. Here you must rebuild the application, upgrading alone is not enough.
  • Updates to c-ares, OpenSSL, SQLite and Undici, and removal of trust in the eMudhra intermediate authority.
  • What to do now

  • Upgrade Node.js to 22.23.4, 24.22.1 or 26.12.1, starting with services that accept compressed bodies or fetch user-supplied URLs.
  • Meanwhile, reject encoded bodies where they serve no purpose (body-parser's inflate: false option). This does not cover responses fetched with fetch().
  • Do not rely on the WAF: it cannot see the responses your service fetches itself.
  • What this means for an AI agent

    An agent with a "read a web page" tool does exactly what the first route describes: it calls fetch() on a URL it did not choose alone. A prompt injection can send it to a hostile server answering with a booby-trapped Brotli stream. The MCP server or agent backend running on Node.js then becomes the target.

    Building software? CleanIssue performs security audits for your product in real-world conditions, no source code access needed. For a first read of your exposure, start with an external review of your application.

    Want to know what your AI agent can do?

    Tell us about your agent, its tools, and client context. We will come back with the right review scope.

    Discuss your audit