Skip to content

CVE-2026-111497: Google Brotli Decompression Out-of-Bounds Write Remote Code Execution ("Node2Shell")

Density:
C-Level Executive Briefing CVE-2026-111497 CRITICAL SCORE 98/100

A critical vulnerability (CVE-2026-111497, dubbed 'Node2Shell') was disclosed in Google Brotli's streaming decompressor library and ported through Node.js native bindings (node:zlib). Inconsistent distance ring-buffer tracking allows maliciously formatted HTTP request or response bodies to overwrite heap memory outside the allocated decompression buffer. This grants unauthenticated attackers remote arbitrary code execution inside downstream Node.js application containers and edge proxies. Immediate patching of Node.js runtime instances to 18.20.7, 20.18.2, 22.13.1, or 23.6.1 is required.

HYBRID

HERMES THREAT SCORE & AGENTIC PIPELINE VULNERABILITY EVALUATION

Target: Google Brotli (c/dec/decode.c) & Node.js Native Decompression Subsystem
Confidence: 99%
98 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 19 / 20
Weaponization 20 / 20
Exposure 20 / 20
Prevalence 20 / 20
Impact 20 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 20 / 20

On October 29โ€“30, 2026, security researchers coordinated with the Google Brotli maintainers and the Node.js project to release emergency patches addressing CVE-2026-111497 (tracked in cybersecurity feeds as โ€œNode2Shellโ€ or โ€œBroccoli2Shellโ€).

The vulnerability lies in c/dec/decode.c within the Google Brotli decompression library during streaming block reconstruction. By providing corrupted Huffman prefix codes coupled with out-of-range backward distance offsets, an attacker forces the decompressor into an invalid state machine loop where decoded output bytes are written past the boundaries of the output ring-buffer into adjacent heap allocations.

Because Node.js embeds Google Brotli inside its core C++ binding (src/node_zlib.cc) to power node:zlib, fetch(), and streaming decompression middleware, this C-level memory corruption completely bypasses JavaScript memory safety guarantees and V8 engine isolation.

The Brotli algorithm processes compressed streams through meta-blocks containing literal bytes and insert-and-copy commands. Each copy command references historical decoded data located distance bytes prior in the sliding window.

In c/dec/decode.c, the state transition BROTLI_STATE_COMMAND_POST_WRAP calculates the source pointer for copied bytes:

/* Vulnerable logic in BrotliDecompressStream (c/dec/decode.c) */
size_t copy_src = (s->ringbuffer_mask & (size_t)(s->pos - s->distance));
if (copy_src + copy_len > s->ringbuffer_size) {
/* Integer wrapping flaw under malformed distance code tables */
memcpy(s->ringbuffer + s->pos, s->ringbuffer + copy_src, copy_len);
}

When an attacker crafts a stream with an invalid dynamic Huffman distance code table that evades initial boundary validation, copy_len can wrap through an integer conversion, leading to an unbounded memcpy() that writes outside the allocated ring buffer into adjacent heap arenas.

In Node.js, BrotliDecompressStream allocates memory on the native heap via node::crypto or standard system malloc. A precise heap layout allows an attacker to overwrite function pointers or the metadata of internal V8 ArrayBuffer objects, transforming the memory corruption into arbitrary native code execution.

Autonomous AI agents, webhook handlers, and RAG ingestion microservices frequently fetch untrusted web pages, markdown documents, and API responses:

  1. Autonomous Web Scraping: AI agents performing real-time search or fetching external URL content via fetch() with default Accept-Encoding: gzip, deflate, br headers automatically decompress hostile responses using node:zlib.
  2. Reverse Proxy & Ingress Controllers: Node.js-based API gateways (e.g., Express Gateway, Fastify Ingress) parsing incoming Content-Encoding: br payloads decompress requests before authentication.
  3. Multi-Tenant Serverless Execution: Serverless functions handling compressed event streams are vulnerable to container breakout and sandbox compromise.
  1. Runtime Upgrades: Upgrade Node.js installations across all deployment targets to fixed releases:

    • Node.js 22 LTS: upgrade to v22.13.1
    • Node.js 20 LTS: upgrade to v20.18.2
    • Node.js 18 LTS: upgrade to v18.20.7
    • Node.js 23 Current: upgrade to v23.6.1
  2. Upstream Library Recompilation: For standalone C/C++ services, Python packages (brotli, urllib3), and Bun runtimes, recompile against Brotli 1.0.10, 1.1.1, or 1.2.1.

  3. Temporary WAF Inspection: Deploy Web Application Firewall (WAF) rules at the perimeter to reject incoming requests with Content-Encoding: br where payload entropy or header lengths violate standard bounds, or temporarily strip br from Accept-Encoding headers at edge reverse proxies (Cloudflare, AWS CloudFront, NGINX).

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-111497: Google Brotli Decompression Out-of-Bounds Write Remote Code Execution (\VULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTExpress Gateway API Proxy
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in Express Gateway API Proxy documented in Hermes dossier.”

Supporting Verified Evidence: