node-opcua access control bypass in namespace role permissions
node-opcua
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| node-opcua npm |
|
|
| node-opcua-address-space npm |
|
|
| node-opcua-server npm |
node-opcua
| Product | Affected | Fixed in |
|---|---|---|
| node-opcua npm |
|
|
| node-opcua-address-space npm |
|
|
| node-opcua-server npm |
≥ 2.42.0 · < 2.180.0
|
node-opcua is an OPC UA implementation for TypeScript and Node.js. From 2.42.0 until 2.180.0, namespace-level access control configured through setDefaultRolePermissions is not honored by the runtime enforcement path for nodes without explicit per-node RolePermissions. SessionContext.getApplicableRolePermissions reads a missing or null DefaultRolePermissions metadata value instead of the configured namespace field, and the null result is treated permissively. An anonymous network client can consequently write variables with CurrentWrite access or call bound methods when an operator configured a restrictive namespace default and relied on inheritance. Servers with no declared policy, nodes with explicit per-node permissions, and correctly bound programmatic namespace metadata are outside the authorization-bypass case. This issue is fixed in version 2.180.0.
From the CVE record · GitHub_M
In affected node-opcua packages, namespace-level access control set through setDefaultRolePermissions is not enforced for nodes without explicit per-node RolePermissions. An unauthenticated network client can write variables with CurrentWrite access or call bound methods if an operator relies on a restrictive namespace default inherited by those nodes. No user interaction is described.
Engineers running npm packages node-opcua, node-opcua-address-space, or node-opcua-server at versions >=2.42.0 and <2.180.0 should check their deployments.