Skip to content
kushal.st

Node.js Brotli RCE (CVE-2026-111497): Why You Should Upgrade Even If You Don't Use Brotli

7 min read Security, Node.js, CVE, JavaScript

Originally published on Medium - read it there ↗

A remote code execution bug in Node’s bundled Brotli decoder affects every supported release line. Here’s what it is, why “we don’t use Brotli” isn’t a safe answer, and exactly what to upgrade to.

When a security advisory names a feature you don’t use, it’s tempting to file it under “not our problem.” The October 2026 Node.js security release is a good example of why that instinct can be wrong.

TL;DR

  • On October 21, 2026, Node.js shipped fixes for 10 CVEs (4 high, 3 medium, 3 low) across the 22.x, 24.x and 26.x lines.
  • The headline bug, CVE-2026-111497, is an out-of-bounds write in the bundled Brotli decoder that can permit remote code execution.
  • Upgrade to 22.23.4, 24.22.1 or 26.12.1 (or later).
  • Node 20 is end of life and gets no fix. Move those services to 22 or 24.
  • You’re likely exposed even if you never call a Brotli API, because built-in fetch() decompresses Brotli responses automatically.

What happened

CVE-2026-111497 is a high-severity memory-corruption bug in the Brotli decoder that ships inside the Node.js runtime. Malformed compressed input makes the decoder write outside its intended buffer.

Because this happens in native code rather than JavaScript, the damage isn’t contained by a try/catch. Depending on the build and the exploit, the result can be a process crash, memory disclosure, or code execution with your Node process’s permissions.

The fix pulls in the upstream Brotli patch (Google’s Brotli 1.2.1, with backports to 1.1.1 and 1.0.10) so invalid input is rejected before the unsafe write.

Where things stand (as of October 22, 2026):

  • Node.js rates it high, not critical.
  • A public proof of concept exists. It reached code execution only in a deliberately weakened build; against stock Node.js it produced a crash and limited memory disclosure.
  • No exploitation in the wild had been reported.

That’s not a reason to wait. A reachable native memory-corruption bug plus an available patch is reason enough to move.

It’s not just Brotli: the full list

Three of the other nine fixes are also rated high, and none of them involve compression.

High severity

  • CVE-2026-111497: Brotli decoder out-of-bounds write, potential RCE (22, 24, 26)
  • CVE-2026-106069: TLS hostname-check bypass for hosts loosely resolving to an IP (22, 24, 26)
  • CVE-2026-105483: TLS hostname-check bypass using fullwidth digits, e.g. 127.0.0.1 (24, 26)
  • CVE-2026-105482: dns.resolve truncates names containing a NUL character (22, 24, 26)

Medium severity

  • CVE-2026-105481: Keep-alive socket can process a response written before the request (22, 24, 26)
  • CVE-2026-106072: Non-canonical IPv4 cert validation lets DNS SANs authenticate IPs (22, 24, 26)
  • CVE-2026-106074: Randomness caches persist in startup snapshots and SEAs (22, 24, 26)

Low severity

  • CVE-2026-106070: ZipFile returns attacker-controlled bytes after header validation fails (26)
  • CVE-2026-106071: Permission Model filesystem over-grant via wildcard (26)
  • CVE-2026-106073: Permission Model bypass via fs.realpathSync (22, 24, 26)

Numbers in brackets are the affected Node.js release lines.

The release also does two more things worth knowing:

  • Blocks compromised CA keys. Eight eMudhra/emSign intermediate CA keys were reported compromised. Node now blocklists them and removes three emSign roots from its bundled store.
  • Updates bundled dependencies. Undici and c-ares on all lines, OpenSSL on 22.x and 24.x, and SQLite on 22.x.

“But we don’t use Brotli”

This is the most common reaction, and it’s the one most likely to leave you exposed. Four reasons to upgrade anyway:

1. fetch() decompresses Brotli for you. Node’s built-in fetch(), powered by Undici, automatically decodes responses served with Content-Encoding: br. Your code never imports zlib, yet the vulnerable decoder still runs.

Picture a service that fetches a user-supplied URL to build a link preview. If an attacker controls that URL’s server, they control the compressed response, and it reaches the decoder through an outbound call. An inbound WAF never sees it.

2. Your dependencies may decompress on your behalf. Body-parsing middleware, HTTP clients, upload processors and queue consumers can all call into Brotli without your code asking.

3. Nine other fixes have nothing to do with compression. TLS hostname bypasses, DNS truncation and the compromised CA keys affect almost any service that makes network calls.

4. The bug lives in the runtime, not in npm. Updating your framework, your lockfile or the undici package does not replace the copy bundled inside the Node binary. Only upgrading Node does.

To be fair: an affected runtime isn’t automatically exploitable. An attacker needs a path to make your process decompress Brotli data they control. But proving you have no such path across every dependency is far harder than running an upgrade.

Which version to upgrade to

Stay on your current major line where you can; a patch release on the same line keeps compatibility changes to a minimum.

  • Node 26.x (Current) → upgrade to v26.12.1 or later
  • Node 24.x (LTS) → upgrade to v24.22.1 or later
  • Node 22.x (LTS) → upgrade to v22.23.4 or later
  • Node 20.x and older (End of life) → no fix; migrate to 22.x or 24.x

A note on Node 20. It’s easy to read an advisory that lists only 22, 24 and 26 and conclude 20 is unaffected. The opposite is true: end-of-life lines are always affected when a security release ships; they just don’t get the patch. If you still run Node 20 anywhere, this is your migration deadline.

If you get Node from a Linux distribution or a commercial support vendor, check their advisory for CVE-2026-111497 directly. A backported fix may carry an older-looking version string.

How to upgrade

In production

  1. Inventory every runtime. Servers, container base images, CI runners, serverless functions, startup snapshots and single-executable apps (SEAs). Check inside each one:

    node --version
    node -p "JSON.stringify({ node: process.version, brotli: process.versions.brotli, undici: process.versions.undici })"

    Don’t rely on process.versions.brotli alone: Node can cherry-pick a security patch without bumping the reported Brotli version.

  2. Upgrade the binary and rebuild. Update base image tags or digests and rebuild every stage. Editing a Dockerfile does nothing for containers already running.

  3. Regenerate snapshots and SEAs. The randomness-cache bug (CVE-2026-106074) means artifacts built on an old runtime keep the problem until rebuilt.

  4. Redeploy and verify every replica. Restart long-running workers, then update autoscaling templates and rollback targets so an old image can’t quietly return.

  5. Test TLS integrations. The CA blocklist may break a chain that used a compromised intermediate. Investigate with the provider; never disable certificate verification to “fix” it.

  6. Check managed hosting. Providers like Vercel roll patch versions automatically for 22.x and 24.x, but projects pinned to 20.x must switch and redeploy.

On your laptop

Developers should upgrade locally too. A vulnerable runtime on a dev machine still runs fetch() against third-party APIs, and local versions drifting from production causes its own bugs. With nvm:

nvm install 22.23.4      # or: nvm install 24.22.1
nvm alias default 22.23.4
node --version

If you’re on Node 20 locally, move to whichever of 22 or 24 your services use. While you’re there, update .nvmrc and the engines field in each repo so the next person gets the right version.

Can’t upgrade today?

The Node.js advisory offers no workaround for the Brotli bug; upgrading is the fix. If you need a few days, treat anything you do in the meantime as exposure reduction with an owner and a deadline, not as a solution.

  • Stop decompressing untrusted Brotli input where your architecture allows, and strip Content-Encoding: br from untrusted inbound traffic at the proxy.
  • Restrict outbound destinations for services that fetch user-supplied URLs.
  • Watch for warning signs: unexpected SIGSEGV crashes, repeated decoder errors, or worker restarts after compressed input. These are leads to investigate, not proof of compromise.

What doesn’t work: inbound WAF rules can’t see responses your code fetches; changing Accept-Encoding doesn’t stop a hostile server sending Brotli anyway; and a JavaScript try/catch can’t contain native memory corruption.

The takeaway

Application code can be perfectly secure and still run on a vulnerable runtime. The lesson from CVE-2026-111497 is to put Node itself, and everything it bundles, on your patch inventory alongside your npm packages.

The to-do list is short: upgrade to 22.23.4, 24.22.1 or 26.12.1, get off Node 20, rebuild and redeploy everything, and have your developers do the same locally. Whether or not you think you use Brotli, it’s the cheapest insurance you’ll buy this quarter.

If this helped, share it with whoever owns your base images.

References