Node.js Patched a Brotli Remote Code Execution Bug. Check Whether You're Exposed
If you run Node.js anywhere that touches the internet, today's chore is to run one command and compare one number. The Node.js project shipped security releases on October 21 for its 26.x, 24.x and 22.x lines, and the he
If you run Node.js anywhere that touches the internet, today's chore is to run one command and compare one number. The Node.js project shipped security releases on October 21 for its 26.x, 24.x and 22.x lines, and the headline bug is the kind that makes security teams reach for coffee.
The flaw, CVE-2026-111497, is an out-of-bounds write in the Brotli decoder that Node bundles. Node's advisory rates it high, and its own text says the bug can allow remote code execution. Here is what it affects, how to check, and how I'd prioritise the upgrade.
What was released
According to the Node.js advisory, updates for the 26.x, 24.x and 22.x lines are Node.js 26.12.1 (Current), 24.22.1 (LTS) and 22.23.4 (LTS). The Hacker News reports that the release fixes ten flaws. Corgea counts four as high severity:
- CVE-2026-111497: Brotli decoder out-of-bounds write that permits remote code execution.
- CVE-2026-105482: dns.resolve truncates names containing a NUL character.
- CVE-2026-105483: TLS certificate hostname bypass when an IP address is written with fullwidth digits.
- CVE-2026-106069: TLS certificate hostname bypass when the host loosely resolves to an IP address.
The release notes also list a medium-severity HTTP agent issue, a medium issue about random caches across startup snapshots (CVE-2026-106074), and low-severity zlib and permission-model fixes. The release updates dependencies including c-ares, undici and root certificates, and it distrusts the compromised eMudhra intermediate certificates.
Image: Martin Vorel via Wikimedia Commons, CC BY-SA 4.0
How bad is the Brotli bug?
Node's advisory is blunt that the flaw can lead to memory disclosure or remote code execution. The Cyber Security Agency of Singapore gives it a CVSS 3.1 score of 9.8 out of 10 and says exploitation requires an affected application to decompress attacker-controlled Brotli-compressed data.
That condition is the key to your own risk assessment. OX Security spells out what it covers: anything that calls zlib.brotliDecompress or brotliDecompressSync on attacker data, or fetches Brotli-encoded responses by sending Accept-Encoding: br, including indirectly through libraries. In plain terms, a service that proxies or fetches third-party content may be exposed even if it never touches Brotli directly in your own code.
The urgency is higher than a normal patch. Cycode reports that a public proof of concept exists and that code execution has been demonstrated on the official Node.js 24.22.0 arm64 image. As of October 23, Cycode says no exploitation in the wild had been reported and the CVE was not in the CISA Known Exploited Vulnerabilities catalog. That can change quickly, so do not treat "not yet exploited" as comfort.
Check your version first
Run this on every host and in every container image you ship:
BashCopy
node --version
Compare the result with the fixed versions for your line:
| Release line | Vulnerable | Fixed |
|---|---|---|
| 22.x | Before 22.23.4 | 22.23.4 |
| 24.x | Before 24.22.1 | 24.22.1 |
| 26.x | Before 26.12.1 | 26.12.1 |
Node.js 20.x and earlier have reached end of life and will not receive the fix, The Hacker News notes, so any service on those versions is vulnerable until you move it to a supported line. That is a bigger project than a patch, but it is the only real answer.
Qualys adds a scheduling note: Node.js 26 becomes an LTS line on October 28, 2026, so teams on 26.x should move to 26.12.1 before that transition.
How to upgrade
Prerequisites: shell access to the host or the build pipeline for your images, and a way to run your tests.
For version managers, OfSec suggests installing the latest on the same line and making it the default, for example nvm install 22. For Docker, OfSec says to rebuild images with docker build --pull and redeploy them, because a cached base image will still contain the old Node.
If you install Node from a Linux distribution, the Brotli code may come from a separate library. Convika notes that Google published fixed Brotli releases (1.2.1, 1.1.1 and 1.0.10) and that Debian builds its nodejs package with a shared Brotli, so the fix reaches you through your distribution's updates, not only through Node's. OfSec suggests checking how your node binary links Brotli with ldd $(command -v node) and looking for brotli in the output. If it is linked, wait for the distribution's fix or switch to an official build.
Bun users are affected by the same decoder code. Cycode lists Bun 1.4.4 as carrying the fixed Brotli library, so update that too if you run it.
Image: Crew via Wikimedia Commons, CC0
What to patch first
We haven't tested these releases ourselves. This is based on the Node.js advisory and the coverage cited above.
My priority order:
- Internet-facing services that decompress Brotli from users, proxies or third-party APIs.
- Backend-for-frontend services and API gateways written in Node, since they fetch and relay a lot of encoded content.
- Build servers and CI jobs that download packages or artifacts over HTTP.
- Internal tools and anything behind a VPN, which are lower urgency but still need the fix.
Vercel's advisory page makes the same point in stronger terms for its own customers: if you run Node.js outside its managed runtimes, upgrade now regardless of WAF protections. A web application firewall is not a reliable patch for a memory-safety bug.
The TLS bugs deserve a look too
Two high-severity TLS flaws let a certificate be accepted for the wrong host when an IP address is written in an unusual way, such as with fullwidth digits. If your service connects to other hosts by IP and relies on certificate verification, these matter. If you only connect by normal hostnames, the practical risk is lower, though the fix is still the same upgrade.
The dns.resolve bug is more subtle: names containing a NUL character get truncated. That can matter in code that builds hostnames from untrusted input. If your code does that, validate the input in any case.
Troubleshooting the upgrade
If your tests fail after upgrading, look at the dependency updates first. This release bumped undici and c-ares and updated root certificates, so network behaviour and certificate trust can shift slightly. If a container still reports the old version, your base image is cached: rebuild with --pull. If you cannot move off Node 20 yet, isolate those services from untrusted input and restrict where they fetch Brotli content from until you can upgrade.
Should you care?
Yes, if you run Node.js in production. This is the sort of flaw where the fix is a version bump and the risk of waiting is a public proof of concept. The harder question is exposure: whether any of your services decompress Brotli data they do not control. If you are not sure, assume they do and upgrade. If you only run Node on a laptop for local development, update at your next convenience, since an attacker would first have to get you to process hostile data.
Frequently Asked Questions
Which Node.js versions fix CVE-2026-111497?
22.23.4, 24.22.1 and 26.12.1, one for each supported line.
Am I vulnerable if I do not use Brotli?
Possibly. The risk applies when your app decompresses attacker-controlled Brotli data, including Brotli-encoded responses fetched through libraries.
Is it being exploited?
As of October 23, Cycode said no exploitation in the wild had been reported, though a public proof of concept exists.
What about Node.js 20?
It is end of life and will not receive the fix, according to The Hacker News.
Image: Lorenzo Cafaro via Wikimedia Commons, CC0
Originally published on Mango Developer.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.