CVE-2026-111497: Google Brotli Decompression Out-of-Bounds Write Remote Code Execution ("Node2Shell")
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.
HERMES THREAT SCORE & AGENTIC PIPELINE VULNERABILITY EVALUATION
Target:Google Brotli (c/dec/decode.c) & Node.js Native Decompression Subsystem Executive Summary
Section titled โExecutive Summaryโ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.
Vulnerability Mechanics & Root Cause
Section titled โVulnerability Mechanics & Root Causeโ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.
Attack Surface in Modern Agentic Architectures
Section titled โAttack Surface in Modern Agentic ArchitecturesโAutonomous AI agents, webhook handlers, and RAG ingestion microservices frequently fetch untrusted web pages, markdown documents, and API responses:
- Autonomous Web Scraping: AI agents performing real-time search or fetching external URL content via
fetch()with defaultAccept-Encoding: gzip, deflate, brheaders automatically decompress hostile responses usingnode:zlib. - Reverse Proxy & Ingress Controllers: Node.js-based API gateways (e.g., Express Gateway, Fastify Ingress) parsing incoming
Content-Encoding: brpayloads decompress requests before authentication. - Multi-Tenant Serverless Execution: Serverless functions handling compressed event streams are vulnerable to container breakout and sandbox compromise.
Remediation & Mitigation
Section titled โRemediation & Mitigationโ-
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
-
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. -
Temporary WAF Inspection: Deploy Web Application Firewall (WAF) rules at the perimeter to reject incoming requests with
Content-Encoding: brwhere payload entropy or header lengths violate standard bounds, or temporarily stripbrfromAccept-Encodingheaders at edge reverse proxies (Cloudflare, AWS CloudFront, NGINX).
CVE-2026-111497: Google Brotli Decompression Out-of-Bounds Write Remote Code Execution (\VULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)