Node-opcua
node-opcua: Unbounded nonce cache enables unauthenticated heap exhaustion DoS
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.166.0
Fixed in 2.166.0
Mitigation
Upgrade node-opcua to 2.166.0 or later.
References
- Vendor advisory github.com/node-opcua/node-opcua/security/advi…
- Patch github.com/node-opcua/node-opcua/commit/b82c29…
- Release notes github.com/node-opcua/node-opcua/releases/tag/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.