Blog Cybersecurity
Node.js Brotli Flaw: Safe Versions and How to Update
On this page· 7 sections
The Node.js project released versions 22.23.4, 24.22.1, and 26.12.1 on 21 October 2026 to close a Brotli flaw tracked as CVE-2026-111497. Deliberately malformed compressed data can overwrite memory and, according to Node.js, lead to remote code execution. Any application that decodes Brotli data from outside parties should be updated.
What was fixed on 21 October
The Node.js security release of 21 October 2026 fixed 10 vulnerabilities: four rated High, three Medium, and three Low. Updates cover the three supported lines, 22.x, 24.x, and 26.x. In its official announcement, Node.js lists CVE-2026-111497 as High severity and says it affects all three lines.
The other High-severity items are of two kinds. Two concern hostname checks on TLS certificates when an IP address is written in an unusual form, and one concerns dns.resolve, which truncates hostnames that contain a NUL character. The same release also updates root certificates after the compromise of an intermediate CA operated by eMudhra. This article focuses on the Brotli flaw because it is the one closest to code execution.
Two of the other flaws deserve a note from teams that use Node.js to call other services. CVE-2026-106069 arises because an address such as 0127.0.0.1 is read as octal under the WHATWG rules that tls.checkServerIdentity() follows, while the operating system resolver, notably on macOS, may read it as decimal. A server can pass the check with a certificate issued for a different IP address. CVE-2026-105482, for its part, is a follow-up fix for an earlier flaw that had only closed dns.lookup().
How the Brotli flaw works
Brotli is a compression format commonly used to shrink web responses. According to Node.js, the bundled Brotli decoder treated an invalid block switch as a temporary need for more input rather than a permanent format error. The decoder then kept appending data to an eight-byte internal buffer and wrote past its end.
An attacker who can supply Brotli data that an application decodes through the node:zlib module can potentially crash the process, leak memory contents, or run code. The flaw was reported by OpenAI Codex Security (Khai Tran and Sylvie Mayer) and fixed by mcollina and aduh95.
Two entry points deserve attention. The first is an application reading a Brotli-compressed response through the built-in fetch() function. The second is middleware that decodes a Brotli-compressed request body. The Hacker News reports that Express 5 opens the second path through its body parsers (express.json(), express.urlencoded(), express.text(), and express.raw()) when they are applied to a route. A plain HTTP server does not decode a Brotli body just because it receives one.
Affected and safe versions
The flaw affects the 22.x, 24.x, and 26.x lines below the fixed versions. Node.js states that end-of-life versions are always affected by a security release, and The Hacker News says the 20.x line and older receive no fix.

Node.js has published no runtime workaround for this flaw. Installing a fixed version is the only way to close it. The 24.x and 22.x lines have LTS status and are the most common in production, while 26.x is the latest release.
Exploitation status
On 23 October 2026, security firm Imperva showed a proof of concept called Node2Shell. According to The Hacker News, it ran code on the official Node.js 24.22.0 image for Linux arm64, with no debugger or custom build. The attempt did not succeed every time and took several tries. Imperva tested only that configuration, so other architectures and the 22.x and 26.x lines were not tested. On Node.js 24.22.1, the same data was rejected and no code ran.
An earlier public proof of concept existed, but the report says it achieved code execution only on a deliberately weakened build. On a standard build, its author recorded only a crash and a limited read of process memory. The article states that no exploitation in the wild had been reported as of 22 October.
Platform company Vercel said it added blocking rules for inbound requests on 21 October, and Imperva added rules to its own web application firewall. Rules of this kind do not cover Brotli responses an application fetches from other servers, so they do not replace the update.
What this means for development and operations teams
Many services in Indonesia run on Node.js: online store APIs, payment gateways, public-service applications at government agencies, and servers that render web pages. The first job is to find out which Node.js version is actually running, and not to rely on notes in the project documentation. A single machine often keeps several versions through a version manager such as nvm.

A few points to keep in mind while working through those four steps:
- Check the version with
node -von every server, CI stage, and container. Compare the result with 22.23.4, 24.22.1, or 26.12.1. - Rebuild container images. Each image carries its own copy of Node.js, so updating the host does not change it. The author of the tests at lilting.ch notes that the
node:24.22.1,node:22.23.4, andnode:26.12.1tags were published on release day, and that rebuilding withoutdocker pullcan keep an old version from the cache. - Restart long-running processes. Processes started before the update keep using the old Node.js until they are stopped and started again.
- Move applications off end-of-life lines. For Node.js 20 and older, there is no official fix.
If the update cannot be installed today, reduce exposure by limiting which applications accept Brotli-compressed request bodies from unknown parties. Node.js itself offers no workaround, so this is only a stopgap. Setting Accept-Encoding: identity on fetch() does not help either: according to lilting.ch’s tests, fetch() decodes Brotli based on the Content-Encoding header of the response.
Teams that manage many Node.js services can start with an inventory of internet-facing systems. Help from a cybersecurity service, release-process planning through cloud computing services, or restructuring an application through web application development can fill the gap if that inventory does not exist yet. We covered a similar case on another platform in our article on the critical PHP2Shell flaws.
Frequently asked questions
Is my application affected if it does not use Brotli?
The greatest risk is in applications that decode Brotli data from outside parties, whether through fetch() or through middleware that parses request bodies. An application that never receives Brotli data carries less risk, but its Node.js version still sits on an affected line. It is best to update without waiting for proof that the path is used.
Has the flaw been exploited?
According to The Hacker News, no exploitation in the wild had been reported as of 22 October 2026. Imperva has demonstrated code execution on a specific test configuration, so the risk is real. This can change, so checking official sources periodically remains necessary.
Which version should I install?
Install 22.23.4 for the 22 line, 24.22.1 for the 24 line, and 26.12.1 for the 26 line. If you still run Node.js 20 or older, plan a migration to one of the supported lines.
Closing
This Brotli flaw shows that risk can also come from libraries hidden inside the runtime. Start with a list of Node.js versions across all your servers and images, then update the affected ones. If your team needs help mapping and organizing updates, Merakit is ready to talk.
Sources
- Node.js: Wednesday, October 21, 2026 Security Releases (21 October 2026)
- Node.js 24.22.1 (LTS) (21 October 2026)
- The Hacker News: Researchers Demonstrate Node2Shell RCE Exploit on Node.js Build Using Crafted Brotli Data (23 October 2026)
- lilting.ch: Node.js v24.22.1 fixes four HIGH CVEs (21 October 2026)