Node2Shell is a Brotli bug: on Linux, your Node.js version number won’t tell you if you’re fixed
Updated October 26: Microsoft fixed it in .NET 8.0.33, 9.0.22 and 10.0.14, and RFF’s check now finds .NET too. On Windows that’s the bigger job: even the Photos app carries its own vulnerable .NET.
Updated October 25: it isn’t just Node. Anything that carries its own copy of Brotli needs its own update. Which ones have shipped, and which I couldn’t confirm yet, below.
On October 21, Node.js shipped 22.23.4, 24.22.1 and 26.12.1 to fix CVE-2026-111497, an out-of-bounds write in the Brotli decoder. Imperva named it Node2Shell and got code running on the official Node.js 24.22.0 build with nothing but crafted Brotli data. A public proof of concept has been out since October 22. No exploitation has been reported yet.
Node.js 20 and older get no fix. Neither do the odd-numbered lines.
Who can be reached
A Node app is exposed when it decompresses Brotli data an attacker controls. Three common ways that happens without anyone writing “brotli” in their code:
fetch()decompresses responses for you. If a response saysContent-Encoding: br, Node’s built-infetch()decodes it. Any app that fetches from a URL someone else controls (webhooks, link previews, “import from URL” features, anything with SSRF) can be fed a malicious response.- Express 5’s body parsers decode Brotli request bodies (
express.json(),express.urlencoded(),express.text(),express.raw()). node:zlibused directly on untrusted input.
A plain Node HTTP server doesn’t decode request bodies on its own.
The bug is in Brotli, not in Node
The Node.js fix is an update of its bundled copy of Google’s Brotli library, and Google released Brotli 1.2.1, 1.1.1 and 1.0.10 the same day for the same CVE. That matters on Linux, because distribution Node packages often don’t use the bundled copy.
I checked two lab machines:
- Ubuntu 26.04: the
nodejspackage (22.22.1) is built against the system Brotli library,libbrotli11.2.0. - Rocky 9.8: the
nodejs:22module (22.23.2) loadslibnode.so, which uses the systemlibbrotli1.0.9.
So on those machines Node’s version number is irrelevant. 22.22.1 isn’t “below 22.23.4” in any way that matters; it’s exactly as safe as the system Brotli library, and neither distribution had shipped a fixed one on October 23. The fix will arrive as a libbrotli1 or libbrotli update.
The same library is loaded by plenty of other programs. On the Ubuntu lab machine that list included NetworkManager, CUPS, fwupd and the GNOME shell. Whether each of them ever decodes Brotli from the network is a different question, but they all get fixed by the same package update, and they all keep running the old copy until they restart.
Check one Linux machine
Ask Node which Brotli it’s actually running:
node -e "console.log(require('fs').readFileSync('/proc/self/maps','utf8').includes('libbrotlidec') ? 'system Brotli library' : 'bundled Brotli')"
If it says system Brotli library, check the library package, not Node. On Debian and Ubuntu:
zgrep -c CVE-2026-111497 /usr/share/doc/libbrotli1/changelog.Debian.gz
On RHEL, Rocky and Alma:
rpm -q --changelog libbrotli | grep -c CVE-2026-111497
0 means the fix isn’t installed yet. If it says bundled Brotli, Node’s own version is the answer: node --version should be 22.23.4, 24.22.1, 26.12.1 or newer.
One trap: node -p process.versions.brotli looks like the obvious check, and it isn’t. The fixed Node.js 24.22.1 still reports Brotli 1.2.0, the same as the vulnerable 24.22.0, because the patch didn’t change the version string. It’s useful for one thing only: on Rocky it said 1.0.9, which gives away that Node is using the system library.
After the library update, anything that had it loaded keeps running the old code until it restarts. This lists those processes:
sudo grep -l 'libbrotlidec.* (deleted)$' /proc/[0-9]*/maps
Check one Windows machine
Official Windows builds of Node bundle Brotli, so the version is the right test, and you can read it from the file without running anything. node.exe turns up in more places than Program Files: nvm-windows, portable zips, and vendor products that ship their own copy. dir searches a drive far faster than PowerShell does:
cmd /c "dir /s /b C:\node.exe 2>nul" | ForEach-Object { "{0,-10} {1}" -f (Get-Item $_).VersionInfo.ProductVersion, $_ }
Anything below 22.23.4, 24.22.1 or 26.12.1 needs updating, and 20 or older needs moving to a supported line. A copy under C:\ProgramData shows up twice, the second time under C:\Users\All Users: that’s a Windows junction to the same folder, not a second copy. Electron apps (VS Code, Teams, Slack) embed Node differently and don’t show up here; their fixes come from each vendor.
It’s not just Node.js
The bug is in Google’s Brotli library, so it’s in every app that compiled in its own copy of versions 1.0.3 through 1.2.0. Updating Node or your Linux libbrotli package doesn’t touch those. Each one needs its own update, from whoever ships it.
Fixed so far (as of October 25):
- Brotli itself: 1.0.10, 1.1.1 and 1.2.1. Pick the one for your branch.
- Bun: 1.4.4.
- .NET: 8.0.33, 9.0.22 and 10.0.14 (October 25). Self-contained, single-file and Store apps carry their own copy; how to find them on Windows.
- Python:
brotli1.2.1 andbrotlicffi1.2.1.0. Check virtualenvs and apps that ship their own Python, not just the system one. - Ruby: the
brotligem 0.9.1 (it vendored 1.2.0). - Envoy Proxy: 1.40.0, 1.39.3, 1.38.6 and 1.37.8. Istio: 1.29.9, 1.30.6 and 1.31.2.
- UEFITool: release A76 (it bundled 1.2.0).
Then there’s the stuff sitting on your desktops. Browsers decode Brotli every time a site sends Content-Encoding: br, and 7-Zip forks like 7-Zip-zstd and NanaZip ship a Brotli codec. I couldn’t find a fixed version for any of those yet, so I’m not going to guess at one. Keep the browsers on auto-update (they move fastest), and update the 7-Zip forks when their maintainers ship. If you’ve got a PDF or imaging tool that opens Brotli-compressed content, ask the vendor. (Yes, that’s the “email the vendor and wait” answer. Sorry.)
I’ll update this list as fixes land.
Doing this across a fleet
The RFF Script Library has two entries:
- HTTP2Shell / Node2Shell (CVE-2026-111497) - Node.js and .NET Brotli Exposure Check for Windows finds every
node.exeon every fixed drive and every running copy, plus every .NET runtime copy (shared, self-contained, single-file and Store apps), reads each version from the file, and reports it as vulnerable, fixed or unsupported, flagging the ones under version managers and user profiles. - Node2Shell / Brotli (CVE-2026-111497) - Exposure Check (Linux) judges the system Brotli library by its changelog, decides for each distribution Node package whether it follows that library or its own version, finds upstream builds and nvm copies, checks running containers, lists what has the library loaded, and flags processes still running a replaced copy.
Neither one runs a binary a user could have planted. On Linux it only runs root-owned copies; for the rest it reads the version from an nvm-style folder name or says it couldn’t tell. In the lab, two booby-trapped “node” files in a user’s home folder were found and never executed.
RFF is free for your first 100 endpoints: getrff.com.
Sources
- Node.js: Wednesday, October 21, 2026 Security Releases
- Google: Brotli releases (1.2.1, 1.1.1 and 1.0.10)
- The Hacker News: Researchers Demonstrate Node2Shell RCE Exploit on Node.js Build Using Crafted Brotli Data
- Brandefense: Node2Shell: Fixed Node.js Versions and Check
- Patch the Planet: Brotli decoder vulnerability (CVE-2026-111497) (Bun, Envoy Proxy, Istio and upstream fixed versions)
- Aikido: Node2Shell evolves to HTTP2Shell (the Python packages)
- UEFITool: issue #492, bundled Brotli 1.2.0
- Ruby
brotligem: issue #64, vendored Brotli 1.2.0
Comments
Comments use GitHub Discussions, so you'll need a GitHub account to post. Corrections are especially welcome.