---
id: CVE-2026-54156
title: node-opcua is an OPC UA implementation for TypeScript and Node.js
summary: >-
  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…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-770
vendor: node-opcua
product: node-opcua
affected:
  - node-opcua < 2.166.0
patched:
  - node-opcua 2.168.0
published: '2026-09-14'
updated: '2026-09-14'
sourceUpdated: '2026-09-14T17:17:46.927'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-54156'
references:
  - url: >-
      https://github.com/node-opcua/node-opcua/commit/b82c2939fe9c658de58da993f2798ec5481d7313
    label: security-advisories@github.com
  - url: 'https://github.com/node-opcua/node-opcua/releases/tag/v2.166.0'
    label: security-advisories@github.com
  - url: >-
      https://github.com/node-opcua/node-opcua/security/advisories/GHSA-6wvw-vrw4-363w
    label: security-advisories@github.com
  - url: 'https://github.com/node-opcua/node-opcua/releases/tag/v2.168.0'
  - url: 'https://github.com/advisories/GHSA-6wvw-vrw4-363w'
tags:
  - nvd
  - cve.org
  - ghsa
  - npm
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-09-14T16:35:36.222019Z'
aliases:
  - GHSA-6wvw-vrw4-363w
ecosystem: npm
ingestedAt: '2026-08-20T18:59:55.152Z'
epss: 0.00784
epssPercentile: 0.54177
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-54156)

Affected packages:

- `node-opcua <= 2.165.0`

Patched in:

- `node-opcua 2.168.0`

Source: https://github.com/advisories/GHSA-6wvw-vrw4-363w
