ZeroHour

CVE-2026-54155

moderate

Authentication bypass via forged password blob and token replay in node-opcua

CVSS 3.1
7.7 high
EPSS
Published
()
Modified
AI analysis

node-opcua, a TypeScript/Node.js implementation of the OPC UA industrial communication protocol, fails to verify that the trailing bytes of a decrypted RSA-OAEP password blob match the current session's serverNonce in versions before 2.166.0. An unauthenticated remote attacker can fetch the server's public key via the GetEndpoints service, craft a malicious UserNameIdentityToken whose length field decodes to an empty password, and authenticate to any account whose isValidUser check accepts an empty password. The missing nonce binding also lets an attacker replay a captured UserNameIdentityToken ciphertext from one session in another, and when SecurityMode=None is permitted the separate client-signature safeguard is removed. Any deployment running node-opcua < 2.166.0 as an OPC UA server with username/password authentication is affected, especially those with permissive security policies or accounts that allow blank passwords. No public proof-of-concept exists and the flaw is not on the CISA KEV list, so exploitation in the wild is not known.

What to do: Upgrade node-opcua to version 2.166.0 or later, which adds serverNonce verification. Until patched, audit user accounts for any that accept an empty password and remove or harden them, disable SecurityMode=None and require signing/encryption security policies, and rotate credentials for accounts whose tokens may have been captured, since previously intercepted UserNameIdentityTokens could have been replayed.

Affected
node-opcua project (Sterfive) node-opcuaall versions prior to 2.166.0
Estimated exposure
moderatethousands of deployments (likely 1k-10k OPC UA server instances) — node-opcua is a popular open-source npm library with roughly tens of thousands of weekly downloads, but OPC UA servers are typically deployed in niche industrial/IIoT environments, and public scans show only a few thousand internet-exposed…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

node-opcua is an OPC UA implementation for TypeScript and Node.js. Prior to 2.166.0, the UserNameIdentityToken authentication handler in packages/node-opcua-server/source/opcua_server.ts decrypts an RSA-OAEP password blob but does not verify that the trailing bytes match the current session serverNonce. An unauthenticated remote attacker can obtain the server public key through GetEndpoints and forge a blob whose little-endian length produces an empty password passed to isValidUser, compromising accounts that accept an empty password. Missing nonce binding also allows a captured UserNameIdentityToken ciphertext to be replayed in another session, and SecurityMode=None removes the separate client-signature safeguard. This issue is fixed in version 2.166.0.

Weakness
CWE-347
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L

In the news

No ingested article mentions this CVE yet.