Breaking Node.js Project (Google Brotli) Node.js zlib Brotli decoder
CVE-2026-111497: Node.js Brotli decoder memory corruption, nicknamed Node2Shell
A crafted Brotli stream can corrupt memory in Node.js and in the Brotli library, and Node.js says it permits remote code execution. Public proof-of-concept code exists but reliable code execution on standard builds is disputed; no exploitation in the wild is reported.
Published Updated
Breaking News: Node.js Project (Google Brotli) isn't one of the vendors we track every day, but this vulnerability is serious enough to cover.
Also affects products we track
- Palo Alto Networks: Prisma Cloud - Application Security Transporter Client, PAN-OS 12.2, PAN-OS 12.1, PAN-OS 11.2. Palo Alto Networks's affected versions and fixes
Affected and fixed versions
| Product / branch | Fixed in |
|---|---|
| Node.js 26.x before 26.12.1 | 26.12.1 or later |
| Node.js 24.x before 24.22.1 | 24.22.1 or later |
| Node.js 22.x before 22.23.4 | 22.23.4 or later |
| Node.js 25.x, 23.x, 21.x, 20.x and older (end of life) | No fix. Upgrade to a supported release |
| Google Brotli 1.2.0 to before 1.2.1 | 1.2.1 or later |
| Google Brotli 1.1.0 to before 1.1.1 | 1.1.1 or later |
| Google Brotli 1.0.3 to before 1.0.10 | 1.0.10 or later |
Always confirm against the vendor advisory, which lists every fixed hotfix.
Why this matters
Node.js runs a large share of web back ends, API gateways, build tools and serverless functions, and Brotli is a common web compression format. The flaw is in the Brotli decoder that ships inside the Node.js runtime, so every supported Node.js line is affected. The same bug is in Google’s Brotli library, which other software bundles (Brandefense lists Python’s brotli packages and Bun). It is on PatchTonight because Node.js and Brotli are not vendors we track, but nearly every organisation has some Node.js in production, and public proof-of-concept code is circulating.
Products we track. No tracked vendor advisory for this CVE was known when this page was written. If one is published, it will appear in the “Also affects products we track” box on this page.
What it is
Malformed Brotli data can make the decoder write past the end of an internal buffer. Node.js explains the cause: an invalid block switch was reported as a temporary need for more input rather than a permanent format error, so the streaming decoder kept appending input to an eight-byte internal buffer.
An attacker who can get Brotli data into anything your app decompresses with node:zlib can corrupt process memory. Node.js says this can lead to a crash, disclosure of process memory, or remote code execution. Google scored it CVSS 4.0 9.2 (Critical); Node.js rated it High, its highest in this release.
How real is the code execution? Sources disagree, and you should plan for the worst case:
- Imperva’s Red Team named the flaw “Node2Shell” and, as relayed by Rescana, reports code execution in test applications on the official Node.js 24.22.0 Linux arm64 image; 24.22.1 rejected the same input.
- The Hacker News reports a public PoC on October 22 that reached code execution only on a deliberately weakened test build, and gave a crash and limited memory read on a standard build.
- Brandefense reports other teams got crashes only, one got local command execution only with an unfixed system Brotli and predictable memory layout, and a dissenting analysis calls it denial of service.
Exploitation in the wild: none reported. The CVE is not in CISA’s KEV catalog (catalog 2026.10.23) and CISA’s SSVC data in the CVE record says exploitation is “none”. EPSS is 0.7% (53rd percentile) on 2026-10-24. Brandefense warns that exploit code and “checkers” from unknown sources may contain malware.
Am I affected?
You are affected if you run Node.js 22.x before 22.23.4, 24.x before 24.22.1 or 26.x before 26.12.1, or any end-of-life line (25.x, 23.x, 21.x, 20.x and older), which gets no fix. You are exposed in practice if your application decompresses Brotli data that an attacker can influence.
Brandefense lists the likely paths:
- Express 5 with
express.json(): body-parser 2.x decodes Brotli request bodies by default. This is the most direct route. - Server-side
fetch(): Node’s undici decompresses Brotli responses, so a malicious or compromised server you call can reach the decoder. Vercel notes that its WAF rules do not cover this case. - Code that calls
zlibBrotli functions directly (for examplecreateBrotliDecompress). - Express 4.21.2 to 4.22.3 is not exposed through body-parser, which returns 415 for Brotli bodies, but other code may still decode Brotli.
Updating Express or body-parser does not fix the bug, because it is in the runtime (Qualys, Rescana).
Check the version inside the thing that actually runs, not on the build host:
node --version
Qualys notes vulnerable Node.js often hides in nvm, bundled runtimes, single-executable applications, container images and serverless runtimes. Brandefense advises checking the version inside an image, since tags like node:24 do not tell you the patch level.
Brandefense reports that builds using an unfixed system Brotli library are also exposed.
What to do
- Upgrade Node.js to 22.23.4, 24.22.1 or 26.12.1 or later. Node.js 26 becomes LTS on October 28, 2026 (Qualys), so move to 26.12.1 rather than an older 26.x.
- Restart services and rebuild container images. Beazley notes that services must be restarted and images that bundle the runtime rebuilt for the fix to take effect.
- Move off end-of-life lines. Node.js 20 and older, 21.x, 23.x and 25.x get no fix. Vercel customers on Node.js 20 must switch to 22.x or 24.x and redeploy.
- Update other software that bundles Brotli: Brotli 1.2.1, 1.1.1 or 1.0.10; Python
brotliandbrotlicffi1.2.1 or later per Brandefense; Bun 1.4.4. - If you can’t patch tonight, reduce exposure. Node.js lists no workarounds, and these do not make an unpatched runtime safe:
- Block or strip
Content-Encoding: bron inbound requests at the edge (Brandefense). - Limit compressed payload size and decompression ratio at a reverse proxy or WAF (Qualys).
- Prioritise internet-facing services that decompress untrusted Brotli data (Qualys, Beazley).
- Vercel has deployed free WAF rules for all its projects, but says they are no substitute for patching. If your back end sits behind Vercel, restrict direct access to it.
- Block or strip
- If an exposed service ran a vulnerable version, review it for crashes and odd behaviour (below). If you see signs of code execution, treat the host as compromised: rebuild it and rotate secrets the process could read.
Detection
No indicators of compromise have been published. No hashes, IPs or domains have been released by Node.js, Google, Imperva, Vercel or the other sources checked.
- Unexpected process exits during decompression and Brotli decoder errors in application logs. Imperva (via Rescana) says these can help you prioritise investigation but are not reliable signs of exploitation alone.
- Correlate crashes with the deployed Node.js version, the source of the compressed data and the request path.
- Look for requests with
Content-Encoding: brfrom unexpected clients, and outbound fetches that receive Brotli responses from untrusted servers. - Vercel customers can review blocked requests in the Firewall dashboard.
- Be careful downloading “checker” tools or exploit code from unknown repositories.
Indicators of compromise
No indicators of compromise have been published for this CVE yet. We'll add them here if the vendor or a researcher releases any. Until then, use the behaviour in Detection.
Sources
Spotted a mistake on this page? Tell us, and we'll fix it.
Page changelog
- Full analysis published.