CVE-2026-68904: node-opcua TCP socket leak in keepalive reconnection

CVE-2026-68904 · Severity: high · CVSS 7 · Published 2026-09-16

node-opcua is a Node.js library for connecting to OPC UA industrial automation servers. A resource exhaustion vulnerability allows TCP sockets to accumulate in FIN-WAIT-2 state during automatic reconnection cycles, causing memory exhaustion and process crashes. The issue is triggered by default settings when the remote server has clock skew relative to the client.

Technologies: node-opcua (npm). Vendors: npm.

Quick answers

Is CVE-2026-68904 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-68904 being exploited in the wild.
How severe is CVE-2026-68904?
High severity, with a CVSS score of 7, published 16 September 2026.
Which products and versions are affected?
node-opcua (npm) >= 2.0.0, < 2.170.0, SEMVER:introduced=2.0.0,fixed=2.170.0; node-opcua-client (npm) >= 2.0.0, < 2.170.0, SEMVER:introduced=2.0.0,fixed=2.170.0; node-opcua-transport (npm) >= 2.0.0, < 2.170.0, SEMVER:introduced=2.0.0,fixed=2.170.0.
Is there a fix for CVE-2026-68904?
Yes. node-opcua (npm): upgrade to 2.170.0 or later; node-opcua-client (npm): upgrade to 2.170.0 or later; node-opcua-transport (npm): upgrade to 2.170.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-68904 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-68904?
Check whether you run node-opcua (npm), node-opcua-client (npm) or node-opcua-transport (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • node-opcua (npm): upgrade to 2.170.0 or later
    npm install node-opcua@2.170.0
  • node-opcua-client (npm): upgrade to 2.170.0 or later
    npm install node-opcua-client@2.170.0
  • node-opcua-transport (npm): upgrade to 2.170.0 or later
    npm install node-opcua-transport@2.170.0

Technical details

The vulnerability combines two bugs in node-opcua. First, ClientTCP_transport._on_ACK_response() calls socket.end() instead of socket.destroy() on failed handshakes, leaving sockets in FIN-WAIT-2 state if the peer doesn't respond (common with PLCs). Second, ClientSessionKeepAliveManager._ping_server() incorrectly treats BadInvalidTimestamp responses (application-level OPC UA status codes caused by clock skew) as fatal network errors, triggering reconnection on every keepalive ping. With default keepAliveInterval of 3 seconds, this causes ~20 socket leaks per minute. No special privileges or user interaction required; the vulnerability is triggered by default configuration (keepSessionAlive: true) when connecting to a server with clock skew. Fixed in version 2.170.0.

Affected products

  • node-opcua node-opcua 2.0.0 to 2.169.0
  • node-opcua node-opcua-client 2.0.0 to 2.169.0
  • node-opcua node-opcua-transport 2.0.0 to 2.169.0

Identifiers

  • CVE-2026-68904
  • GHSA-r2pf-9cw4-5j65

Timeline

  • 2026-09-16: disclosed: Advisory GHSA-r2pf-9cw4-5j65 published
  • 2026-09-16: patched: Version 2.170.0 released with fixes

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.