ZeroHour

CVE-2026-54156

moderate

Unauthenticated DoS via unbounded nonce cache in node-opcua < 2.166.0

CVSS 3.1
7.5 high
EPSS
Published
()
Modified
AI analysis

node-opcua, an OPC UA stack for TypeScript and Node.js, keeps a process-global cache of client nonces (g_alreadyUsedNonce, checked by nonceAlreadyBeenUsed in server_secure_channel_layer.ts) with no expiration and no size limit. An unauthenticated remote attacker can repeatedly open secure channels and create sessions with unique nonces, and those entries persist even after sessions expire, so heap usage grows without bound regardless of the maxSessions limit. The result is exhaustion of the default Node.js heap and a crash of the node-opcua server process — a pure availability impact (CVSS 3.1: 7.5). Any deployment exposing a node-opcua-based OPC UA server built from a version before 2.166.0 to a network an attacker can reach is affected. The issue is fixed in 2.166.0, and no public proof-of-concept or in-the-wild exploitation is known.

What to do: Upgrade node-opcua to version 2.166.0 or later in any product or service that embeds it, including vendored/copied dependencies. Until patched, restrict access to OPC UA endpoints (typically TCP 4840) to trusted networks via firewall rules or VPN, since no authentication is required to trigger the flaw. Monitor Node.js heap usage and container/process restart events on OPC UA servers for signs of memory growth or crash-looping.

Affected
node-opcua project (Sterfive) node-opcuaall versions prior to 2.166.0
Estimated exposure
moderatethousands to tens of thousands of node-opcua-based OPC UA server deployments (order of magnitude estimate) — node-opcua is a popular npm library with sustained weekly downloads in the tens of thousands and is commonly embedded in industrial/OT gateways, but public internet scans of OPC UA (port 4840) endpoints cannot distinguish node-opcua…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

node-opcua is an OPC UA implementation for TypeScript and Node.js. Prior to 2.166.0, the process-global g_alreadyUsedNonce cache used by nonceAlreadyBeenUsed in packages/node-opcua-secure-channel/source/server/server_secure_channel_layer.ts records nonces from OpenSecureChannelRequest and CreateSession without expiration or a size limit. An unauthenticated remote attacker can repeatedly create sessions with unique nonces, causing entries to persist after session expiry and accumulate across connection cycles even when maxSessions=10 limits concurrent sessions. The resulting unbounded heap growth can exhaust the default Node.js heap and crash the node-opcua server process. This issue is fixed in version 2.166.0.

Weakness
CWE-770
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

In the news

No ingested article mentions this CVE yet.