node-opcua: Unbounded nonce cache enables unauthenticated heap exhaustion DoS (CVE-2026-54156)
Description
A vulnerability in node-opcua versions prior to 2.166.0 allows an unauthenticated remote attacker to exhaust server heap memory by exploiting an unbounded nonce cache. The cache, used for replay detection, does not evict entries, enabling heap exhaustion through repeated session creation requests. This leads to denial of service by crashing the server process.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
node-opcua contains a process-global nonce cache without an eviction policy, tracked in the g_alreadyUsedNonce object. Nonces are added on every OpenSecureChannelRequest and CreateSession request but never removed or expired. An unauthenticated attacker can exploit the CreateSession path, which requires no certificate, to accumulate nonce entries indefinitely. Despite limits on concurrent sessions, nonces persist after session expiry, causing heap growth and eventual exhaustion. Testing confirmed significant heap increase with thousands of nonces, projecting out-of-memory conditions under default Node.js heap limits. The suggested fix is to implement a TTL-based eviction policy for the nonce cache, expiring entries after the maximum session timeout or a fixed window.
Potential Impact
The vulnerability allows an unauthenticated remote attacker to cause a denial of service by exhausting the server's heap memory. This results in the node-opcua server process crashing, disrupting service availability. There is no impact on confidentiality or integrity. The CVSS score is 7.5 (High) reflecting the ease of remote exploitation and the denial of service impact.
Mitigation Recommendations
A patch is available to address this vulnerability by adding a TTL-based eviction policy to the nonce cache (g_alreadyUsedNonce). Nonces should expire after the maximum session timeout or a reasonable fixed window, preventing unbounded memory growth. Users should upgrade to node-opcua version 2.166.0 or later where this fix is implemented.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6wvw-vrw4-363w
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54156"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a91a87facd9273b4906a29c
Added to database: 08/28/2026, 15:25:51 UTC
Last enriched: 09/08/2026, 04:07:47 UTC
Last updated: 10/12/2026, 06:48:17 UTC
Views: 106
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.