🚀 New: chi (χ) — an open-source autoresearch harness for fleets of LLM coding agents. Read the announcement.

Node's November Security Release: Where TLS Terminates Decides Your Exposure

Node.js 22.23.5, 24.22.3 and 26.13.1 fix 16 CVEs. The worst, CVE-2026-123864, leaks heap memory including TLS private keys, but only when Node terminates TLS. How to triage by deployment topology, and why patching may not be the last step.

Contents

Node.js released 22.23.5, 24.22.3 and 26.13.1 on November 11 with fixes for 16 CVEs. Most of the coverage leads with the count and the HTTP/2 crashes. The detail that decides how urgent this release is for you is one sentence at the end of the worst advisory, CVE-2026-123864: “Cleartext node:http is not affected.”

That bug lets an unauthenticated client read memory belonging to other connections, “including TLS private keys and other users’ requests.” It only exists when Node itself is the TLS server. The same is true for three more of the high and medium issues in this release. So before reading 16 advisories, answer one question about each service: does the process that runs https.createServer(), tls.createServer() or http2.createSecureServer() face clients, or does something in front of it terminate TLS?

The key leak: an empty write inside the parser

The advisory and the fix commit describe the mechanism. When asked to write zero bytes, TLSWrap::DoWrite() calls ClearOut() directly. ClearOut() decrypts the next TLS record that is waiting on the socket and hands it to the consumer. If that empty write comes from JavaScript running inside the HTTP parser’s on_body callback, the next record is fed to llhttp_execute() while the parser is still in the middle of executing the previous one.

The parser was never meant to be re-entered like that. When the inner call returned, it reset the parser’s record of the current buffer instead of restoring the outer one, and the outer call carried on with pointers into data that was no longer valid. The result is a use-after-free and an out-of-bounds heap read, and the bytes it reads get delivered to your handler as request body data.

The advisory gives the trigger conditions:

  • a handler that calls res.flushHeaders() before the request body has ended, and later calls res.end() with a non-empty chunk;
  • for an attacker to read the result, “any ordinary route that echoes or stores a request body.”

The regression test added with the fix shows the shape of an attack. It sends two requests on one connection to a handler that flushes headers early, with the second request’s body split across TLS records and the records batched into a single TCP write. Before the fix, the second request’s body could contain server heap.

Note the word “stores.” An echo route returns the leaked bytes to the attacker immediately. A route that saves the body, a comment field or a webhook log, writes them into your database, where the attacker reads them later through whatever view displays the stored record. If you had this exposure, leaked memory may now be sitting in rows that are backed up and replicated.

The fix has two parts. In crypto_tls.cc, the empty-write path now only calls ClearOut() when cycle_depth_ == 0, so a write issued during a read cycle no longer pulls in the next record; the cycle reads it after the listener returns. In node_http_parser.cc, re-entrant Execute() calls still work, but each one restores the caller’s buffer on return, and a data callback pointing outside the buffer being executed fails with the new HPE_REENTRANT_EXECUTE error instead of reading through a stale pointer.

Sorting the release by topology

Here is how the high and medium issues split, using the affected-line and reachability statements from the advisory:

IssueWhat it needsReachable when
CVE-2026-123864, heap leak into request bodyNode as HTTPS server, flushHeaders() patternNode terminates TLS
CVE-2026-126051, process crashNode as TLS server using SNICallback, OCSPRequest, newSession, resumeSession or addContext()Node terminates TLS
CVE-2026-123872, client-cert bypass via renegotiationTLS 1.2, per-hostname client-cert policyNode terminates TLS
CVE-2026-123867, per-host mTLS fails open to default CASNI context with a CA but no certificateNode terminates TLS
CVE-2026-123863, CVE-2026-123874, CVE-2026-123866, CVE-2026-123865, CVE-2026-123868, CVE-2026-123875, CVE-2026-123828an HTTP/2 serverClients speak HTTP/2 to Node, over TLS or cleartext h2c
CVE-2026-123877, TLS session reuse across trust policieshttps.Agent as a clientAlways, independent of the server side
CVE-2026-123871, proxy credentials in error messagesoutbound proxy configAlways

If an ALB, nginx, Envoy or Cloudflare terminates TLS and forwards plain HTTP/1.1 to Node, the first four rows can’t be reached from the internet, and neither can the HTTP/2 rows. For the inbound side, that makes this ordinary patching rather than an incident. The last two rows still apply to the same process, so check its outbound HTTPS and proxy use before closing the ticket.

Two topologies don’t get that pass. A proxy that re-encrypts to the backend puts Node’s TLS server back in the path. The attacker’s requests are re-framed by the proxy, so the record batching the regression test relies on may be harder to arrange, but nobody has documented how hard, and I would treat those services as exposed. The second is internal HTTP/2. gRPC services and anything using http2.createServer() between services are exposed to every internal client. Several of the HTTP/2 bugs need nothing unusual: CVE-2026-123863 aborts the process on “a default http2 server whose handler responds before the request body has ended, which is typical,” and CVE-2026-123874 corrupts memory on any server that uses respondWithFile() or respondWithFD().

The client-side bug nobody’s topology protects

CVE-2026-123877 is on the outbound side. https.Agent reuses sockets and TLS sessions for requests whose options produce the same key. Before the fix, getName() in lib/https.js built that key by concatenating option values into a string. Omitting ca and passing ca: [] produced the same key, so a session authenticated against the default trust store could be resumed by a request that asked for a stricter policy, and the response would report authorized === true.

The key already included the destination host and port, and a non-empty ca value went into it, so a private CA for one upstream and the default store for another was never the problem. The exposure is narrower: requests to the same origin through a shared agent with TLS policies whose encodings collided, such as ca omitted versus ca: [], or options that weren’t in the key at all, like a custom secureContext. The fix encodes each option with its type and length, gives objects such as SecureContext and callbacks a stable identity through a WeakMap, and adds options that were missing from the key entirely, including secureContext, ALPNProtocols, pskCallback and session. A side effect: agent keys are longer, and the test for an empty options object now expects 30 colons instead of 22. If anything in your code parses or logs agent.getName() output, it will see a different format.

Whether to rotate keys

The advisory doesn’t say, and The Hacker News noted the same gap. My view: if a service terminated TLS in Node, used flushHeaders() on any route that can receive a body, and had any route that echoes or persists request bodies, assume the private key could have been read and reissue the certificate. The memory that leaked is the process’s own, and a TLS server keeps its private key loaded in process memory for as long as it runs. Reissuing a certificate costs an afternoon. Proving that no one triggered a bug with no log signature is not possible. The advisory says nothing either way about exploitation, so there’s no reassurance to lean on there.

To find out whether the flushHeaders() pattern exists, search your code and your node_modules for it. Streaming responses and server-sent events are the usual reasons to call it.

Two smaller notes

CVE-2026-123866 says that on 24.x and 26.x the stream teardown can be driven “purely by a remote peer once the window-size change from 26.9.0 and 24.22.0 is present.” A flow-control change in an earlier minor release turned an application-triggered bug into a remotely triggered one. Performance changes to protocol code can widen the reach of an existing bug without anyone noticing.

Node 20 is end-of-life and gets none of these fixes. The advisory’s standing line is that end-of-life versions “are always affected” by a security release.

Sources