Todos los artículos

Node.js October 21 security releases and a Brotli RCE

On 21 October 2026 Node.js shipped security releases for the 26.x, 24.x and 22.x lines. Four of the flaws are rated high. One is memory corruption and possible remote code execution in the Brotli decoder. The other three are TLS and DNS bugs that let a server certificate be accepted for the wrong address.

The new versions are v22.23.4, v24.22.1 and v26.12.1. The announcement only covers those three lines. If you are still on an older line we see no release that will get the fix, so you need to change lines first.

Four high-severity flaws

Out-of-bounds write in the Brotli decoder (CVE-2026-111497). The Brotli decoder bundled with Node treated an invalid block switch as a temporary "need more input" instead of a permanent format error. The streaming decoder therefore kept appending input bytes to an eight-byte internal buffer and wrote past its end. Brotli data that an attacker can make your app decompress with node:zlib can corrupt process memory. The result can be a crash, a leak of process memory or remote code execution. Node 26.x, 24.x and 22.x are affected.

dns.resolve*() truncates names at a NUL byte (CVE-2026-105482). A name like attacker.example\0.trusted.example reaches c-ares as a C string, so attacker.example is resolved and no error is raised. Code that validates a hostname against an allowlist and then resolves it with dns.resolve*() or dns.reverse() can end up with records for a different name than the one it checked. This is an incomplete fix of CVE-2026-48930, which only covered dns.lookup() and the net and tls host options. All three lines are affected.

Certificate bypass for IPs written with fullwidth digits (CVE-2026-105483). tls.checkServerIdentity() did not recognize 127.0.0.1 as an IP address, yet the host still resolves to a normal IPv4. A certificate with no IP SAN, only DNS:127.0.0.1 or DNS:*.0.0.1, could be accepted for that IP. Node 26.x and 24.x are affected.

Wrong IP verified for leading-zero IPv4 (CVE-2026-106069). An address like 0127.0.0.1 is read as octal by WHATWG rules and becomes 87.0.0.1. The operating system resolver on some platforms, macOS for example, reads it as decimal and connects to 127.0.0.1. The certificate is checked against one address while the connection goes to another. All three lines are affected.

The medium and low ones

Three medium issues. An HTTP Agent keep-alive socket can accept a response that was written before the request was sent (CVE-2026-105481). A certificate with only a DNS SAN can be accepted for an IP endpoint when the client spells the address as 0177.0.0.1, 0x7f.0.0.1, 2130706433 or 127.1 (CVE-2026-106072). And the crypto.randomUUID() and randomInt() caches get baked into snapshots built with --build-snapshot, so every process started from that snapshot repeats the same values (CVE-2026-106074).

Three low ones. One is in zlib.ZipFile (CVE-2026-106070) and two are in the Permission Model (CVE-2026-106071 and 106073). If you use --permission, fs.realpathSync() now checks read permission, and wildcard --allow-fs-read rules no longer allow more paths than intended.

The releases also update c-ares, Undici, OpenSSL (24.x and 22.x), SQLite (22.x) and the ca-cert bundle. The ca-cert update covers the compromise of an eMudhra intermediate CA.

The same Brotli flaw hits other software

The bug is in Google's Brotli decoder, and each program ships its own copy, so each one has to update on its own. Researchers at Imperva showed code execution on one unpatched Node.js build. It has not been shown on the other software, and no real-world attacks have been reported.

  • The Google Brotli C library is affected from 1.0.3 through 1.2.0. The fixes are 1.0.10, 1.1.1 and 1.2.1.
  • The Python Brotli and brotlicffi packages should move to 1.2.1 and 1.2.1.0. If they are installed and an HTTP client decodes br responses, you are exposed.
  • Bun 1.4.3 and earlier are affected, fixed in 1.4.4.
  • Envoy and Istio are affected only if Brotli decompression is configured. The fixed Envoy releases are 1.40.0, 1.39.3, 1.38.6, 1.37.8 and 1.36.12, and for Istio 1.31.2, 1.30.6 and 1.29.9.

In Node.js and Bun the risk comes from reading a response sent with Content-Encoding: br through the built-in fetch(), or from unpacking a Brotli request body with Express 5 and body-parser 2. A plain Node.js HTTP server does not decode request bodies on its own. Also, Node 20 and older are end of life and will not get this patch.

What to do

Update Node first.

node -v
# should be 22.23.4 or later on 22.x, 24.22.1 on 24.x, 26.12.1 on 26.x

With Docker, make sure tags like node:22 and node:24 were pulled again and recreate the running containers. As long as the old image is up, the patch is not on your server.

For Brotli, search your code for zlib.brotliDecompress and createBrotliDecompress. If Brotli data comes from outside (an upload, a request or response with Content-Encoding: br) this flaw can reach you. The announcement lists no temporary mitigation, so do not sit on the update. If you do not know whether a package you use calls node:zlib behind the scenes, count that as one more reason to move it up.

Wherever you have a domain allowlist, validate the host strictly before resolving it. Node's fix closes the NUL byte and the odd spellings, but keeping the same defense in your own code does no harm.

const ALLOWED = new Set(['api.example.com'])

function checkedHost(input) {
  if (!/^[a-z0-9.-]+$/i.test(input)) throw new Error('invalid host')
  if (!ALLOWED.has(input.toLowerCase())) throw new Error('host not allowed')
  return input
}

This check lets through no NUL byte, no fullwidth digits and no IPv4 spelling with a leading zero or 0x prefix, because anything not on the allowlist is dropped. If you connect to an external service by raw IP, test the address with net.isIP() and reject fullwidth or zero-prefixed spellings.

Last, if you build snapshots or single executable applications (SEA) and randomUUID() is called during the build, rebuild them with a patched Node. Old output can repeat the same identifiers.

Sources

Related posts

Written by sheduxdev.

Node.js October 21 security releases and a Brotli RCE | TurkishPvP LLC