CVE-2026-68904
largeResource exhaustion in node-opcua: TCP FIN-WAIT-2 socket leak during keepalive reconnects
node-opcua, the most widely used open-source OPC UA implementation for Node.js, contains a resource-exhaustion flaw (CWE-400) in which every failed reconnection leaves a TCP socket stranded in FIN-WAIT-2 state, leaking file descriptors and memory until the process or container is killed by the OOM killer. No attacker interaction is required: with the default keepSessionAlive: true setting, a server clock skewed beyond the server's timestamp tolerance (e.g., an industrial PLC roughly 50 minutes ahead of the client) makes the keepalive manager misread the resulting BadInvalidTimestamp fault as a network outage and force a full transport reconnect every keepAliveInterval, while the failed HEL/ACK handshake path calls socket.end() instead of socket.destroy(), so sockets the PLC never closes accumulate indefinitely. At the commonly used 3-second keepAliveInterval this is about 20 leaked sockets per minute (~1,200 per hour), so an attacker who controls or spoofs a skewed, non-responsive OPC UA endpoint — or simple clock misconfiguration — can crash the Node.js client application, gateway, or SCADA data bridge (CVSS 3.1 7.0 High, availability-focused). Any node-opcua client deployment carries the flawed code (confirmed on 2.169.0, the latest release as of April 2026), but only installations communicating with clock-skewed or non-responding servers actually leak; no public proof-of-concept or in-the-wild exploitation is known.
What to do: No fixed version is named in the advisory, so watch node-opcua releases beyond 2.169.0 and upgrade as soon as a patch lands; in the interim, either disable keepSessionAlive or lengthen keepAliveInterval, and enforce NTP time synchronization (or raise the server's accepted timestamp tolerance) so client request timestamps stay within the server's window. Monitor FIN-WAIT-2 socket counts on client hosts and apply container file-descriptor/memory limits so any leak surfaces as a bounded, restartable failure rather than a silent OOM crash.
| node-opcua project (npm) node-opcua | 2.169.0 (tested; latest release as of April 2026) — the advisory does not state a fixed version or confirm behavior of earlier releases |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
node-opcua is an OPC UA implementation for TypeScript and Node.js. From 2.0.0 until 2.170.0, node-opcua clients using the default keepSessionAlive setting can enter a repeated reconnection cycle when an OPC UA server's clock skew causes BadInvalidTimestamp responses. ClientSessionKeepAliveManager._ping_server treated the server-originated ServiceFault as a network outage and forced a transport reconnect, while ClientTCP_transport._on_ACK_response used socket.end() after failed HEL/ACK negotiation and could leave the connection in FIN-WAIT-2 when the peer did not close. Repetition at the keepAliveInterval accumulates file descriptors and memory until the client process or container can be terminated by resource exhaustion. This issue is fixed in version 2.170.0.
- Ecosystems
- npm
- Weakness
- CWE-400
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
- GHSA
- GHSA-r2pf-9cw4-5j65 (high)
In the news0 stories
No ingested article mentions this CVE yet.