A remote code execution flaw in Google’s Brotli compression library, dubbed Node2Shell, has forced security updates for Node.js and other software that bundles the decoder, after OpenAI said on Friday that its red team found the bug.
Tracked as CVE-2026-111497, the Node2Shell flaw is an out-of-bounds write in the Brotli decoder. Google, which assigned the CVE, rated it 9.2 on the CVSS v4.0 scale. The flaw affects Brotli 1.0.3 through 1.2.0 and is fixed in Brotli 1.0.10, 1.1.1, and 1.2.1. Node.js had rated the bug high severity when it shipped fixes on Wednesday.
According to the CVE record, a remote, unauthenticated attacker who supplies a crafted Brotli stream can corrupt the decoder’s memory, leak memory contents, crash the process, or potentially run code.
OpenAI said in a post on X that it found the bug during a red-teaming exercise and disclosed it to the Brotli project and to downstream projects, including Node.js. The company named Node.js, Bun and Envoy as software that includes the library, and published remediation guidance on its Patch the Planet site.
The root cause was fixed in Brotli’s source code in February. OpenAI said nobody recognised it as a security issue at the time, and no Brotli release followed, so software that bundled the library continued to ship the vulnerable decoder. Google’s CVE record dates the original fix to 27 February.
Because the bug lives in a shared library, each product that embeds Brotli must ship its own update, and its users must install it. OpenAI said attackers could take over unpatched servers by sending them malicious compressed data or compromise clients that fetch compressed data from a malicious server.
Node.js 26.12.1, 24.22.1 and 22.23.4 carry the fix, which Node.js cherry-picked from the upstream Brotli commit. The Node.js advisory credits Matteo Collina with reporting the issue and Antoine du Hamel with the fix.
Imperva researcher Ron Masas, who coined the Node2Shell name, published an analysis on Thursday showing working code execution. His proof of concept ran attacker-supplied code on the official Node.js 24.22.0 Linux arm64 image, and Node.js 24.22.1 rejected the same input.
The code arrived inside Brotli-compressed data, either in a response consumed by Node.js’s built-in fetch() or in a request body decoded by Express 5.0.0 to 5.3.0 or body-parser 2.0.0 to 2.3.0. Imperva said execution took multiple attempts, and that a bare Node.js HTTP server does not decode incoming Brotli bodies unless middleware is configured to do so.
According to Imperva, the vulnerable decoder treated an impossible block transition as a request for more input. It then carried on with an invalid internal state, which led to the out-of-bounds write. The upstream fix makes the decoder return a format error instead.
Bun has fixed the flaw in version 1.4.4, and Google’s Python Brotli package has been fixed in version 1.2.1. OpenAI’s post did not list a fixed Envoy release, and Cyber Kendra could not find one at the time of writing.
CISA’s enrichment of the CVE record lists exploitation as “none”, and the flaw is not in its Known Exploited Vulnerabilities catalogue. Imperva said it has added WAF rules for the flaw.
The same Node.js releases also fix nine other vulnerabilities. Three high-severity bugs are CVE-2026-105483 and CVE-2026-106069, two TLS certificate hostname bypasses involving unusually written IP addresses, and CVE-2026-105482, which dns.resolve truncates names containing a NUL character. Medium-severity fixes cover a third TLS hostname flaw, a keep-alive HTTP response bug, and repeated crypto.randomUUID() values in startup snapshots and single-executable apps. The releases also reject TLS chains containing the compromised eMudhra CA keys.
Node.js end-of-life lines will not receive a fix. Imperva advised checking the Node.js version inside container images, since package inventories can miss a bundled runtime, and limiting untrusted Brotli traffic while updates roll out.
Node2Shell follows PHP2Shell, a pair of critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, that PHP patched on the same day Node.js shipped its fixes.
Updates
- 2026-10-24: Added OpenAI’s statement that its red team found the Node2Shell flaw, Google’s CVE record (CVSS 9.2, Brotli 1.0.3 to 1.2.0 affected), the fixed Brotli and Bun releases, and CISA’s “none” exploitation status.
- 2026-10-23: Added Imperva’s Node2Shell analysis, which reports working remote code execution against Node.js 24.22.0.
- 2026-10-21: Published after Node.js released 26.12.1, 24.22.1 and 22.23.4.
Community Discussion
Join the conversation. Ask questions, share solutions, and help others.
Be the first to start the discussion!
