Node2Shell: Who the Node.js Flaw Really Affects
In short
Node2Shell only hits Node.js applications that decompress Brotli data from untrusted sources, such as Express 5 with body-parser 2 or fetch() calls to third-party servers. The flaw CVE-2026-111497 in the Brotli decoder can lead to remote code execution and has been fixed since 21 October 2026 in Node.js 22.23.4, 24.22.1 and 26.12.1. Since 27 October the US agency CISA lists the flaw as actively exploited. Static websites that use Node only at build time are not affected in operation. Node.js 20 and older get no fix.
Two days after PHP2Shell, the next name is doing the rounds: Node2Shell. The name suggests the same scale, but it is not. Below is what is behind it, who it hits and what to do. The sources are listed at the end of the article.
What Node2Shell is
Node2Shell is the nickname for CVE-2026-111497, a flaw in the Brotli decoder that ships with Node.js. Brotli is a compression method browsers and servers use to transfer data in smaller form. According to the Node.js security advisory, the decoder can write past the end of a memory buffer when fed manipulated compressed data. That is a classic route to crashes and, at worst, to running foreign code.
Node.js rates the flaw “high”, one level below critical. Google, which publishes the Brotli library, rates it critical at 9.2 out of 10 (CVSS 4.0). The bug actually sits in that library. According to Aikido it was fixed there as early as February 2026, but only now picked up in Node.js. Because it hits any software that decompresses Brotli, it now also goes by the name HTTP2Shell.
The timeline:
- 21 October 2026: Node.js releases 22.23.4, 24.22.1 and 26.12.1. The release closes nine further flaws, including two high-rated bypasses of the hostname check for TLS certificates.
- 22 October: a public proof of concept shows code execution on the official Node.js 24.22.0 Docker image for Linux arm64, confirmed by Imperva. According to Aikido it does not work reliably.
- 25 October: Microsoft releases updates for .NET, Visual Studio and PowerShell, which contain the same library.
- 26 October: the security firm ELLIO records the first attack attempt against Node.js 24.22.0 on x86-64. In its own tests, ELLIO achieves code execution on four official Node.js setups for x86-64, so on ordinary servers too.
- 27 October: the US agency CISA adds the flaw to its catalogue of known exploited vulnerabilities. US federal agencies have until 10 November to patch.
According to ELLIO, the first observed attacks were still broken: in 50 attempts against a vulnerable Node.js instance they did not open a shell. They can crash the process, though, and ELLIO itself did achieve code execution.
Who is affected
This is the big difference from PHP2Shell. There, one request to any PHP site was enough. With Node2Shell, the application has to decompress Brotli data an attacker controls. According to Aikido, that happens in three cases:
- Express 5 or body-parser 2.x: these automatically decompress requests with
Content-Encoding: br. An attacker sends the manipulated content directly. fetch()against third-party servers: Node.js decompresses Brotli responses automatically. If you fetch data from servers you do not control, you invite the attack in yourself.- Direct use of
node:zlib: code that callsbrotliDecompressorcreateBrotliDecompresswith untrusted data.
Anything where no Node.js runs at runtime is not affected in operation. That covers many websites that only use Node.js to build.
Not just Node.js
The faulty Brotli versions 1.0.3 to 1.2.0 are in many programs. The library itself is fixed in 1.0.10, 1.1.1 and 1.2.1. For websites and web applications, these are the places that matter most:
- Bun: all versions up to 1.4.3 affected, fixed in 1.4.4.
- .NET: Microsoft released 8.0.33, 9.0.22 and 10.0.14 on 25 October, plus updates for Visual Studio and PowerShell.
- Python: the packages Brotli from 1.2.1 and brotlicffi from 1.2.1.0. According to Aikido, urllib3, Requests and httpx enable Brotli automatically as soon as one of these packages is installed, even if your code never imports it.
- Envoy and Istio: updated. If you run them as a proxy or service mesh in front of your applications, update them too.
According to SecurityWeek, fixes were still pending for some programs at the end of October, including DuckDB, Apache Arrow and p7zip. Broadcom lists VMware SDDC Manager as affected, with the patch still to come.
What it means for typical website setups
Static Astro website. Node.js only runs during the build. The server holds finished HTML files served by an ordinary web server. There is nothing from outside that could send Brotli data to Node.js. Update the build machine anyway, if only because of the other nine flaws.
Astro with the Node adapter, Next.js, Nuxt or your own Express server. Here Node.js runs permanently and accepts requests. That belongs on the update list, whether or not you use Express 5.
Laravel or WordPress projects with Vite. Node.js only builds CSS and JavaScript there. In operation, PHP runs, not Node.js. For these projects, PHP2Shell is the more urgent job.
Headless setups. A build that fetches content from your own CMS via fetch() calls a server you control. That is a low risk. Builds that load data from third-party APIs or feeds are a different matter.
What to do now
- Check the version.
node --versionon servers, CI runners and development machines. For containers:docker run --rm <image> node --version. Safe are 22.23.4, 24.22.1, 26.12.1 and newer. - Rebuild containers and restart processes. Images pinned to a version such as
node:24.22.0-alpinestay vulnerable until the base image is bumped and rebuilt. On servers without containers, the old version keeps running after the update until the Node process is restarted. - Don’t update the npm package. The npm package
brotliis a separate project and has nothing to do with this flaw. The fix lives in the Node.js runtime itself. - Move off Node.js 20. Node.js 20 and older get no fix. Vercel says projects on Node.js 20 need to move to 22 or 24 and redeploy.
- Check Linux packages. Node.js from distribution packages partly uses the system’s Brotli library. Distributions ship the fix at different speeds, so check whether your system’s brotli package has been updated.
- Think of the other runtimes. Bun, .NET and Python environments with Brotli belong on the same list, see above.
If you cannot update right away
According to Aikido, rejecting requests with Content-Encoding: br at the reverse proxy or load balancer helps as a stopgap. Vercel enabled a firewall rule for this across all projects on 21 October. Both only protect incoming requests. They do not cover responses your application loads from third-party servers via fetch(). For that, only the update helps.
What we do at Codeäffchen
Our website is a static Astro site. Node.js only runs in the build, and that only processes our own content. The site we serve contains no Node.js. For client projects running Node.js in operation, the list above applies: check the version, rebuild images, move off Node.js 20.
The lesson is the same as with PHP2Shell, just with narrower preconditions: if you know where which runtime runs in which version, a day like this takes minutes.
Sources
- Node.js: October 2026 Security Releases
- Aikido: Node2Shell: Node.js Brotli vulnerability allows remote code execution
- Aikido: Node2Shell evolves to HTTP2Shell
- Imperva: Node2Shell: From Brotli Data to Remote Code Execution
- ELLIO: Node2Shell (CVE-2026-111497): RCE analysis
- Vercel: Node.js security advisory: Brotli decoder RCE
- SecurityWeek: Node2Shell: Brotli Flaw Triggers Patching Across Microsoft, Node.js, Python Packages
- SecurityWeek: CISA Warns of Node2Shell Exploitation as Honeypots Log Attack Attempts
- BleepingComputer: CISA warns of hackers now exploiting critical Node2Shell flaw
- HeroDevs: CVE-2026-111497 (Node2Shell): Node.js Brotli RCE Fix
You run a Node.js application or an Astro site with server-side rendering and are unsure whether it is affected? Find out more about our work with Astro on the Astro agency page, or send us a short message.
Frequently Asked Questions
Is Node2Shell as dangerous as PHP2Shell?
The preconditions are narrower. PHP2Shell hit every PHP website with a single request. Node2Shell requires the application to decompress Brotli data from an untrusted source. It should still be taken seriously: Google rates it critical (CVSS 9.2), Node.js rates it high, and attack attempts have been seen since 26 October.
Is Node2Shell already being exploited?
Yes. The US agency CISA added the flaw to its catalogue of known exploited vulnerabilities on 27 October 2026. Security firms recorded attack attempts against Node.js 24.22.0 on 26 and 27 October. The first attempts did not open a shell, but they can crash the Node process.
Does the Brotli flaw only affect Node.js?
No. Any software that uses Brotli 1.0.3 to 1.2.0 for decompression is affected. Fixes include Bun 1.4.4 and later, .NET 8.0.33, 9.0.22 and 10.0.14, the Python packages Brotli 1.2.1 and brotlicffi 1.2.1.0, as well as Envoy and Istio. For some programs a fix was still pending at the end of October.
Is my Astro website affected by Node2Shell?
A static Astro website is not affected in operation: it serves finished files, and no Node.js runs on the server. Node.js is only used at build time. Server-side rendering with the Node adapter is different: Node.js then runs permanently and should be updated to a fixed version.
Which Node.js versions are safe?
Node.js 22.23.4, 24.22.1 and 26.12.1, released on 21 October 2026. Older versions of these lines are affected. Node.js 20 and other end-of-life versions get no fix.
How do I check whether my application is affected?
Check the version on servers, CI and in Docker images with node --version. Run npm ls express body-parser to see whether Express 5 or body-parser 2 is in use. Search the code for brotliDecompress and createBrotliDecompress, and note fetch() calls to servers you do not control.
Related Services
Founder & Full-Stack Developer
20+ years of web development experience. Specialised in Laravel, WordPress and custom software for mid-sized businesses.