News / Vulnerabilities · Analysis

Node.js: one bug exploited within a week, another that can leak your private keys.

Node2Shell's fix sat in public code for eight months before Node shipped it, and attackers moved within days. Three weeks later came a bug that can hand TLS private keys to strangers — and the advisory doesn't tell you to rotate them.

Disclosure: This article was drafted with help from Claude, an AI model made by Anthropic. It was fact-checked against the advisories and reporting linked below and edited by [Author name]. Anthropic Research is credited, with researcher Chris Rohlf, for reporting CVE-2026-123864, one of the flaws covered here.

The short version

Official line
Node.js shipped two security releases in three weeks: Oct. 21 (10 fixes, led by the Brotli flaw known as Node2Shell) and Nov. 11 (16 fixes, seven rated high). Upgrade and restart.
Behind it
The Node2Shell fix sat in Google's public Brotli code for about eight months before Node shipped it — and attackers were exploiting it within a week of disclosure. November's worst bug can leak TLS private keys, and patching doesn't un-leak a key.
What to do
Run 22.23.5, 24.22.3 or 26.13.1 or later. If your Node process terminates TLS itself, decide whether to rotate keys.

October: Node2Shell, exploited in a week

On October 21, Node.js released 22.23.4, 24.22.1 and 26.12.1 to fix CVE-2026-111497 — an out-of-bounds write in the Brotli decompression code Node bundles from Google. Crafted compressed data could corrupt memory, and Imperva's red team, which named it Node2Shell, showed it running code on the official Node.js 24.22.0 Linux arm64 image.

The part that should bother you: the underlying fix was committed to Google's Brotli project on February 27, 2026, with no release and no advisory, and stayed publicly readable for eight months. Node shipped a Brotli version without it as late as October 14. Within a week of disclosure, threat intelligence firm ELLIO reported live exploit traffic, and CISA added the flaw to its Known Exploited Vulnerabilities catalog on October 27.

It also wasn't only a Node problem. The same Brotli code ships in Python packages, Bun, Envoy and .NET — Microsoft pushed out-of-band .NET updates on October 25. Anything that bundles its own copy needs its own fix.

A fix that's public but unreleased is a roadmap, not a patch.

November: a bug that can leak your private keys

Three weeks later, on November 11, Node.js released 22.23.5, 24.22.3 and 26.13.1, fixing 16 vulnerabilities, seven rated high. Most are HTTP/2 bugs that let an unauthenticated client crash a server or leak memory, plus a TLS 1.2 renegotiation flaw that can bypass client-certificate checks.

The one to read closely is CVE-2026-123864. A zero-length TLS write issued while the HTTPS parser is mid-request can cause the server to copy freed heap memory into a request body. Node's advisory says an unauthenticated client can read memory belonging to other connections, including TLS private keys and other users' requests. It needs a specific handler pattern to trigger, and any route that echoes or stores a request body to read the leak back.

The limits matter, too. Plain node:http isn't affected, and Red Hat notes that deployments terminating TLS at a separate load balancer or gateway are unaffected. As of the latest reporting, none of November's flaws is confirmed exploited in the wild.

What the advisory doesn't tell you

Node's advisory says private keys can leak, but it doesn't tell you to rotate them. Patching closes the hole; it doesn't recall anything that already walked out. If an affected Node process held your TLS keys and served traffic from untrusted clients, rotating keys and certificates after patching is the conservative move — and invalidating session secrets that lived in the same memory is worth considering too.

Four things to do this week

  1. Get to the November releases. 22.23.5, 24.22.3 or 26.13.1 or later covers both October and November. There's no runtime workaround for Node2Shell; updating is the fix.
  2. Hunt for bundled Node and Brotli. Container base images, Electron apps, serverless runtimes and vendor tools often ship their own Node or Brotli and won't update with your OS.
  3. Decide on key rotation. If Node terminates TLS directly and was internet-facing before you patched, rotate keys and certificates. If TLS ends at a load balancer, you're likely clear for this bug.
  4. Retire end-of-life lines. Node's advisories say end-of-life versions are always affected and never get fixes. If anything still runs one, it has both bugs forever.

Sources

Primary

Reporting and analysis