Skip to main content
EPSS 0.8%top 45%

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

0
High
Published: 08/20/2026 (08/20/2026, 18:35:41 UTC)
Source: GCVE Database
Product: node-opcua

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

npmghsa
node-opcua
Affected versions
<2.166.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/08/2026, 04:07:47 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses