Node2Shell (CVE-2026-111497) & the Nov 11 Security Release: Where Your Node.js Code Actually Decodes Brotli
Everyone says 'patch Node.js' for CVE-2026-111497 (Node2Shell), yet most teams overlook where untrusted Brotli streams actually enter their apps. Here is a practical codebase exposure matrix, live Node 24 fetch() test findings, an audit script, and today's Nov 11 security release status.

TL;DR & Threat Context (Status as of 11 November 2026)
On 21 October 2026, the Node.js project shipped critical security patches across its 22.x, 24.x, and 26.x branches—headline-driven by CVE-2026-111497 (dubbed "Node2Shell"), an out-of-bounds write in Google's bundled Brotli C decoder (c/dec/decode.c). Scoring CVSS 9.2 (Critical) externally and rated "High" by Node.js, the flaw allows unauthenticated remote attackers to crash Node.js servers, leak heap memory, or achieve Remote Code Execution (RCE) via crafted Brotli streams.
- Fixed Versions for Node2Shell: 22.23.4, 24.22.1, and 26.12.1. End-of-life branches (20.x, 23.x, 25.x) receive no fix and must be migrated immediately.
- Today's Security Release (11 November 2026): Node.js has scheduled another security release today targeting 26.x, 24.x, and 22.x with a maximum severity of HIGH. Specific CVE disclosures publish alongside the release binaries—so verify the November 2026 Security Releases blog before rebuilding container fleets so you only patch once.
- The Real Engineering Gap: Most advisories say *"upgrade Node.js."* For engineering teams managing dozens of microservices before maintenance windows open, the operational question is different: which parts of my codebase actually feed untrusted bytes into the Brotli decoder right now?
- Our Sandbox Surprise: Testing benign Brotli compression locally on Node.js `v24.16.0` revealed that native
fetch()unconditionally decompressesContent-Encoding: brresponses—even when you never advertise `br`, and even when you explicitly pass `Accept-Encoding: identity`.
---
How an 8-Byte C Decoder Bug Becomes Node2Shell
CVE-2026-111497 stems from an out-of-bounds write (CWE-787) and unchecked return value (CWE-252) inside Google's shared Brotli decoder library (1.0.3 through 1.2.0; patched upstream in 1.0.10, 1.1.1, and 1.2.1).
During streaming decompression, Brotli payloads can signal block-type switches. When fed a malformed stream containing an invalid block switch transition, the vulnerable C routine treated the broken error state as a benign request for additional input bytes rather than throwing a terminal format error. Consequently, the decoder kept appending bytes past an 8-byte fixed internal buffer, corrupting adjacent C++ heap structures inside the V8 / libuv process.
> [!IMPORTANT]
> `npm update` Fixes Nothing: Because Google's Brotli C decoder is compiled statically into the node binary (node:zlib), patching third-party JavaScript packages in package.json cannot fix CVE-2026-111497. Only upgrading the Node.js runtime eliminates the vulnerable decoder.
---
The Hidden Highways: Where Your Code Decodes Untrusted Brotli
If you run grep -rn "brotliDecompress" src/ and get zero matches, your application is not automatically safe. Modern web frameworks and HTTP clients quietly route arbitrary network bytes through node:zlib on two separate highways:
flowchart TD
subgraph Inbound["Inbound Attack Highway (Client -> Your Server)"]
A1[Attacker Sends HTTP POST + 'Content-Encoding: br'] --> A2{Reverse Proxy / WAF?}
A2 -->|Passes br header| A3[Express 5 / body-parser 2]
A3 -->|inflate: true default| A4[node:zlib Brotli Decoder -> MEMORY CORRUPTION]
A2 -->|Drops 'br' at Edge| S1[SAFE Inbound]
A3 -->|inflate: false| S1
end
subgraph Outbound["Outbound Attack Highway (Your Server -> External URL)"]
B1[Server invokes fetch / axios / got] --> B2[Remote Server / SSRF Target]
B2 -->|Replies 'Content-Encoding: br' IGNORING Accept-Encoding| B3[Node.js undici / HTTP Client]
B3 -->|Auto-Decompresses Response| B4[node:zlib Brotli Decoder -> MEMORY CORRUPTION]
end
classDef danger fill:#c62828,stroke:#b71c1c,color:#fff;
classDef safe fill:#2e7d32,stroke:#1b5e20,color:#fff;
classDef neutral fill:#1565c0,stroke:#0d47a1,color:#fff;
class A4,B4 danger;
class S1 safe;
class A1,A2,A3,B1,B2,B3 neutral;1. Inbound Exposure: Express 5 and `body-parser` 2
According to research published by Akamai and Datadog Security Labs, Express 5 (alongside body-parser 2.x) enables compressed request-body inflation by default (inflate: true).
When a client sends an unauthenticated request containing Content-Encoding: br to *any* endpoint wired with express.json(), express.urlencoded(), or express.raw(), the framework streams the raw HTTP socket payload directly into Node's Brotli decoder before your application routing, schema validation, or authentication middleware ever runs.
2. Outbound Exposure: Native `fetch()`, `axios`, `got`, and `node-fetch`
On the outbound side, Datadog reports that axios, got, and node-fetch advertise and decode Brotli responses by default. Even more surprising is how Node.js's built-in fetch() (undici) behaves in practice.
We ran two benign sandbox tests locally on Node.js `v24.16.0` (an unpatched 24.x build) spinning up an in-process HTTP server returning a valid payload compressed with zlib.brotliCompressSync:
// Safe Sandbox Test: Does native fetch() decode Brotli even if it doesn't ask for it?
const http = require('node:http');
const zlib = require('node:zlib');
const server = http.createServer((req, res) => {
console.log('Client Accept-Encoding:', req.headers['accept-encoding']);
const compressed = zlib.brotliCompressSync(
Buffer.from(JSON.stringify({ status: 'decompressed_by_fetch' }))
);
res.writeHead(200, {
'Content-Type': 'application/json',
'Content-Encoding': 'br',
});
res.end(compressed);
});
server.listen(0, '127.0.0.1', async () => {
const { port } = server.address();
// Test 1: Default fetch()
const r1 = await fetch(`http://127.0.0.1:${port}`);
console.log('Default fetch():', await r1.json());
// Test 2: Explicitly requesting unencoded response
const r2 = await fetch(`http://127.0.0.1:${port}`, {
headers: { 'Accept-Encoding': 'identity' },
});
console.log('Explicit identity header:', await r2.json());
server.close();
});Observed Output on Node.js `v24.16.0`:
Client Accept-Encoding: gzip, deflate
Default fetch(): { status: 'decompressed_by_fetch' }
Client Accept-Encoding: identity
Explicit identity header: { status: 'decompressed_by_fetch' }Look closely at that result:
- Default
fetch()on Node 24.16.0 only advertisedgzip, deflate(withoutbr). - Yet when the server sent `Content-Encoding: br` anyway, `fetch()` automatically decoded it.
- Even explicitly overriding the request header with
Accept-Encoding: identitydid not prevent `undici` from invoking the Brotli decoder on the incoming response!
If your backend uses fetch() to validate webhooks, scrape OpenGraph link previews, proxy third-party files, or process SSRF-adjacent user URLs, sending Accept-Encoding: identity gives a false sense of security. A hostile server simply returns Content-Encoding: br and forces your Node.js worker into the vulnerable C decoder.
---
Safe Codebase Exposure Matrix
Use this matrix to assess where an unpatched runtime (< 22.23.4, < 24.22.1, < 26.12.1) remains exposed despite defensive configurations:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ NODE2SHELL (CVE-2026-111497) EXPOSURE & MITIGATION MATRIX │
├──────────────────────────────────────────┬──────────────────────┬───────────────────────┬────────────────┤
│ CODEBASE ENTRY POINT / CONFIGURATION │ INBOUND RISK │ OUTBOUND RISK │ STATUS │
│ │ (Untrusted Clients) │ (Untrusted Upstreams) │ (Unpatched) │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ Direct node:zlib brotliDecompress*() │ EXPOSED if fed req │ EXPOSED if fed res │ CRITICAL │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ Express 5 / body-parser 2 (Defaults) │ EXPOSED (inflate: │ N/A │ CRITICAL │
│ │ true parses 'br') │ │ │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ Express 5 with inflate: false │ MITIGATED (rejects │ N/A │ SAFE Inbound │
│ │ compressed bodies) │ │ │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ Reverse Proxy strips Content-Encoding:br │ MITIGATED at edge │ NO PROTECTION │ PARTIAL ONLY │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ Built-in fetch() (Default or identity) │ N/A │ EXPOSED (ignores │ HIGH RISK │
│ │ │ Accept-Encoding!) │ │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ axios / got / node-fetch (Defaults) │ N/A │ EXPOSED (advertises │ HIGH RISK │
│ │ │ and decodes br) │ │
├──────────────────────────────────────────┼──────────────────────┼───────────────────────┼────────────────┤
│ Next.js Image Optimization / URL Proxies │ N/A │ EXPOSED if fetching │ CHECK CONFIG │
│ │ │ untrusted remote hosts│ │
└──────────────────────────────────────────┴──────────────────────┴───────────────────────┴────────────────┘---
Automated Codebase Exposure Audit Script (`node2shell-audit.mjs`)
Run this zero-dependency, read-only ESM audit script inside any Node.js, Express, or Next.js repository. It performs zero network calls and touches zero exploit code—it inspects your running Node binary, package.json frameworks, and source trees to highlight real Brotli decompression paths.
Save as node2shell-audit.mjs and execute via node node2shell-audit.mjs:
#!/usr/bin/env node
/**
* node2shell-audit.mjs - Safe, read-only exposure scanner for CVE-2026-111497.
* Checks Node.js runtime patch status, package manifests, and inbound/outbound
* Brotli decompression surfaces across JS/TS files. Zero exploit payloads.
*/
import fs from 'node:fs';
import path from 'node:path';
const ROOT = process.cwd();
const IGNORE_DIRS = new Set(['node_modules', '.next', '.git', '.agents', 'dist', 'build', 'coverage']);
const CODE_EXTS = new Set(['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts', '.jsx', '.tsx']);
function checkNodeRuntime(versionStr) {
const [maj, min, patch] = versionStr.replace(/^v/, '').split('.').map(Number);
if (maj < 22 || [23, 25].includes(maj)) {
return { status: 'EOL_UNPATCHED', detail: `v${maj}.x is End-of-Life and receives no security fixes.` };
}
if (maj === 22) {
return (min > 23 || (min === 23 && patch >= 4))
? { status: 'PATCHED', detail: '>= 22.23.4 (Check Nov 11 advisory for follow-up updates)' }
: { status: 'VULNERABLE', detail: 'Requires >= 22.23.4 (and Nov 11 release)' };
}
if (maj === 24) {
return (min > 22 || (min === 22 && patch >= 1))
? { status: 'PATCHED', detail: '>= 24.22.1 (Check Nov 11 advisory for follow-up updates)' }
: { status: 'VULNERABLE', detail: 'Requires >= 24.22.1 (and Nov 11 release)' };
}
if (maj === 26) {
return (min > 12 || (min === 12 && patch >= 1))
? { status: 'PATCHED', detail: '>= 26.12.1 (Check Nov 11 advisory for follow-up updates)' }
: { status: 'VULNERABLE', detail: 'Requires >= 26.12.1 (and Nov 11 release)' };
}
return { status: 'UNKNOWN', detail: 'Verify manually against nodejs.org security releases.' };
}
function walkFiles(dir, fileList = []) {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
if (IGNORE_DIRS.has(entry.name)) continue;
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) walkFiles(fullPath, fileList);
else if (CODE_EXTS.has(path.extname(entry.name))) fileList.push(fullPath);
}
return fileList;
}
const FINDINGS = {
directZlib: [],
inboundMiddleware: [],
outboundClients: [],
nextConfigRemote: [],
};
const RULES = [
{ key: 'directZlib', regex: /\b(brotliDecompress(Sync)?|createBrotliDecompress)\s*\(/g },
{ key: 'inboundMiddleware', regex: /\b(express|bodyParser)\.(json|urlencoded|raw|text)\s*\(([^)]*)\)/g },
{ key: 'outboundClients', regex: /(?<!function\s)\b(fetch|axios(\.(get|post|request))?|got(\.(get|post))?)\s*\(/g },
];
// 1. Check Node.js Runtime
const runtime = checkNodeRuntime(process.version);
console.log('=== NODE2SHELL (CVE-2026-111497) EXPOSURE AUDIT ===');
console.log(`Runtime Detected : ${process.version} -> [${runtime.status}] ${runtime.detail}`);
// 2. Inspect package.json dependencies
const pkgPath = path.join(ROOT, 'package.json');
if (fs.existsSync(pkgPath)) {
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
const watched = ['express', 'body-parser', 'axios', 'got', 'node-fetch', 'next'];
const foundDeps = watched.filter((d) => allDeps[d]).map((d) => `${d}@${allDeps[d]}`);
console.log(`Watched Packages : ${foundDeps.length ? foundDeps.join(', ') : 'none'}`);
}
// 3. Scan source files
const files = walkFiles(ROOT);
for (const file of files) {
const rel = path.relative(ROOT, file);
const content = fs.readFileSync(file, 'utf8');
const lines = content.split(/\r?\n/);
// Skip browser-only React Client Components ('use client' executes in browser, not node:zlib)
if (/^\s*['"]use client['"]/.test(content)) continue;
// Inspect next.config.* for remote image fetching surfaces
if (path.basename(file).startsWith('next.config.')) {
if (/remotePatterns|domains\s*:/.test(content)) {
FINDINGS.nextConfigRemote.push(`${rel} (Remote image domains configured - audit SSRF/upstream hosts)`);
}
}
lines.forEach((line, idx) => {
const lineNum = idx + 1;
// Skip comments
if (/^\s*(\/\/|\*|\/\*)/.test(line)) return;
for (const rule of RULES) {
let match;
rule.regex.lastIndex = 0;
while ((match = rule.regex.exec(line)) !== null) {
if (rule.key === 'inboundMiddleware') {
// Flag only if inflate: false is absent from options
if (/inflate\s*:\s*false/.test(match[3] || '')) continue;
}
FINDINGS[rule.key].push(`${rel}:${lineNum} -> ${line.trim().slice(0, 90)}`);
}
}
});
}
const report = (label, items) => {
console.log(`\n[${label}] (${items.length} matches)`);
if (items.length === 0) console.log(' Clean');
else items.slice(0, 25).forEach((item) => console.log(` - ${item}`));
if (items.length > 25) console.log(` ... and ${items.length - 25} more.`);
};
report('Direct node:zlib Brotli Calls', FINDINGS.directZlib);
report('Inbound Express/body-parser Without inflate:false', FINDINGS.inboundMiddleware);
report('Outbound HTTP Clients (fetch/axios/got)', FINDINGS.outboundClients);
report('Next.js Remote Fetch / Image Surface', FINDINGS.nextConfigRemote);
if (runtime.status !== 'PATCHED') {
console.log('\n[ACTION] Upgrade Node.js binary immediately and check Nov 11 security release advisories.');
process.exitCode = 1;
}---
Stopgap Mitigations (Before You Can Roll Container Images)
If you cannot push updated Node.js base images immediately, deploy layered stopgaps on both traffic directions while recognizing each control's exact limit:
1. Disable Body Inflation in Express 5 / `body-parser` (Inbound)
Note that setting inflate: false rejects *all* compressed client request bodies (gzip, deflate, br) with HTTP 415 Unsupported Media Type unless clients send plain uncompressed JSON:
import express from 'express';
const app = express();
// Blocks Content-Encoding: br (and gzip/deflate) from reaching node:zlib
app.use(express.json({ inflate: false, limit: '1mb' }));
app.use(express.urlencoded({ extended: true, inflate: false }));2. Strip/Reject `Content-Encoding: br` at Your Reverse Proxy (Inbound)
If legitimate API clients depend on gzip uploads, keep inflate: true and block only br requests inside Nginx or your WAF before they touch Node.js:
# Reject inbound Brotli-compressed request bodies at the Nginx edge
if ($http_content_encoding ~* "br") {
return 415 "Brotli request compression temporarily disabled";
}3. Guarding Outbound Requests (What Edge Rules Miss)
Neither inflate: false nor Nginx ingress rules shield outbound calls. Until the Node runtime binary is patched:
- Never pass user-controlled URLs directly into
fetch(),axios(), orgot(). Enforce strict domain allowlists on webhook targets and OAuth callbacks. - If you must fetch arbitrary third-party endpoints on an unpatched runtime, avoid
fetch()entirely for untrusted links; use rawnode:httpsstreams where you explicitly inspectres.headers['content-encoding']and destroy the socket (res.destroy()) immediately ifbrappears—before reading body chunks intozlib.
---
The Threat Intelligence Conflict: CISA KEV vs. Cloudflare Radar
Security feeds disagreed sharply over active exploitation status during late October and early November 2026:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ SOURCE TELEMETRY DISCREPANCY: CVE-2026-111497 │
├───────────────────────────────────┬──────────────────────────────────────────────────────────────────────┤
│ SOURCE │ CLAIMED EXPLOITATION & KEV STATUS │
├───────────────────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ CISA KEV Catalog (cisa.gov) & │ Confirmed added to CISA Known Exploited Vulnerabilities (KEV) on │
│ GCN / ELLIO Telemetry │ 27 October 2026 (Federal agency deadline: 10 November 2026). ELLIO │
│ │ reported live exploitation attempts starting 26 October 2026. │
├───────────────────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Cloudflare Radar (Zero Wire) │ Marked KEV inclusion and active exploitation as "not established" │
│ │ across its automated reviewed threat-feed snapshot. │
├───────────────────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ ENGINEERING VERDICT │ Primary verification directly against cisa.gov confirms CVE-2026-111497│
│ │ IS listed in the KEV catalog. Treat aggregator cards with caution and│
│ │ assume active scanning against exposed Node.js endpoints. │
└───────────────────────────────────┴──────────────────────────────────────────────────────────────────────┘---
Verification Scope & Authoritative Sources
What Was Tested vs. Verified From Documentation
- Tested Live (Node.js `v24.16.0`): Verified against a benign local HTTP server returning
zlib.brotliCompressSyncpayloads that nativefetch()automatically decompressesContent-Encoding: brresponses even without advertisingbrand even when passedAccept-Encoding: identity. Also verified thenode2shell-audit.mjsruntime version parser againstv24.16.0. - Verified via Primary Documentation (Not Locally Executed):
Express 5/body-parser 2default inflation andinflate: falsemechanics (Akamai, Datadog),axios/got/node-fetchdefault decompression (Datadog), and CISA KEV catalog listing (cisa.gov). Zero exploit payloads were built or executed.
Primary References & Authoritative Advisories
- Node.js Security Release Pre-Announcement (11 Nov 2026): nodejs.org/en/blog/vulnerability/november-2026-security-releases
- Akamai Security Research: Inside Node2Shell: A Closer Look at CVE-2026-111497
- Datadog Security Labs: Node2Shell (CVE-2026-111497) Brotli Decoder Analysis & Mitigations
- Hacktron Technical Analysis: Node2Shell Exposure and Workarounds
- GCN Coverage on CISA KEV & ELLIO Telemetry: CISA Sets November 10 Deadline for High-Severity Node.js Flaw
- Cloudflare Radar Zero Wire Entry: radar.cloudflare.com/security/zero-wire/node2shell
Frequently Asked Questions
Yes. According to Akamai and Datadog Security Labs, Express 5 (and body-parser 2) sets inflate: true by default. Any incoming HTTP request carrying a Content-Encoding: br header passes through Node.js's native zlib Brotli decoder before your route handlers execute.
Yes, if your application fetches untrusted external URLs, user-supplied webhooks, or unvetted APIs. In our live sandbox test on Node.js v24.16.0, native fetch() unconditionally decompressed responses carrying Content-Encoding: br—even when the client did not advertise br in Accept-Encoding or explicitly sent Accept-Encoding: identity.
No. Setting inflate: false in body-parser or stripping Content-Encoding: br at your reverse proxy blocks inbound request-body attacks, but provides zero protection for outbound HTTP requests initiated by fetch(), axios, got, or node-fetch against external servers.
Node.js released security fixes on October 21, 2026 in versions 22.23.4, 24.22.1, and 26.12.1. End-of-life release lines including 20.x, 23.x, and 25.x will not receive security patches and must be upgraded to a supported active release.
No. The out-of-bounds write resides in the native Google Brotli C library compiled directly into the Node.js runtime binary (node:zlib). Updating npm dependencies will not remediate the flaw; you must upgrade the Node.js runtime itself.
On November 11, 2026, the Node.js project scheduled an additional round of security releases across the 26.x, 24.x, and 22.x branches carrying a maximum severity rating of HIGH. Teams planning Node2Shell upgrades should coordinate with the November 11 binaries to avoid upgrading containers twice.


