OPC UA is the protocol factories, utilities and building systems use to let machines and software talk to each other. node-opcua is a widely used JavaScript implementation: npm counted 88,796 downloads in the week of 14 to 20 November 2026. On 6 November 2026 its maintainers changed one default. We did not find the bug. We noticed that the change was a security fix that came with no advisory, and reported that to them. This post is for people who run a node-opcua server and have not heard about it.
What CyberXYZ found
- A security fix with no advisory. Commit de4702df makes the default user certificate store reject unknown certificates. It shipped in 2.187.23 on 6 November 2026. OSV and the project's own advisory page listed no advisory for it on 23 November 2026.
- The old default went back years. We read six releases from 2.60.0 (23 November 2021) to 2.187.0. Every one creates the default user store with "accept unknown certificates" switched on, and the server uses that store unless you give it your own.
- Upgrading does not remove what was already trusted. The old code did not only accept an unknown certificate, it saved it into the trusted folder. A certificate that got in before the upgrade is still trusted after it.
- Our own check was silent too. On 23 November 2026 CyberXYZ Check returned "allow" for node-opcua 2.187.22. We tracked this fix privately from 7 November and had not made it public.
Upgrade to 2.187.23 or later. Then open the trusted folder of the default user certificate store and remove every certificate you did not put there yourself. How to find it.
What the default did
An OPC UA client can log in to a server in three ways: anonymously, with a user name and password, or with a certificate. In the third case the client presents a certificate and proves it holds the matching private key. The server then has to decide whether it trusts that certificate. That decision is the whole login.
node-opcua keeps trusted user certificates in a certificate store. If you do not pass your own store when you create the server, it uses a default one named UserPKI. Before the fix, that default store was created like this:
cm = new OPCUACertificateManager({ name, rootFolder: pkiFolder, automaticallyAcceptUnknownCertificate: true });
With that option on, a certificate the store has never seen is not rejected. It is accepted and written into the trusted folder. The same function creates two stores: one for other applications' certificates and one for users. The option makes sense for the first during development. For users it means a certificate nobody approved is a valid login.
The maintainers describe the consequence themselves in the comment they added with the fix:
// The user PKI ("UserPKI") must not. A user certificate is an identity claim: the // certificate CommonName becomes the user name for the role lookup. If the default // user PKI accepted unknown certificates, any self-signed certificate would log in // as the user named in its CommonName.
The fix is one line. What it leaves behind is a folder.
We are not publishing steps to reproduce it. The maintainers' own test, test_default_certificate_manager_trust.ts, shows the behaviour that changed.
Who is affected
A server is affected when all of these are true:
- It runs a node-opcua version before 2.187.23.
- It was created without its own
userCertificateManager, so it uses the default store. - It offers certificate login. The server's default endpoints do: we read the endpoint code in 2.187.22, and it registers certificate user tokens unless you restrict the token types.
- Someone who should not have access can reach the server's port.
What an intruder can then do depends on your server: which user names carry roles, and what those roles may read, write or call. A server that gives every authenticated user the same rights as an anonymous one loses little. A server that maps an operator or administrator name to write access loses that control.
A server that passes its own user certificate store is not affected by this default. Neither is one that only allows user name and password or anonymous sessions.
What to check
First, the version. This prints every copy of the two packages in a project:
npm ls node-opcua node-opcua-certificate-manager
Anything below 2.187.23 has the old default. node-opcua-certificate-manager is the package that holds it, and other node-opcua packages depend on it, so check it even if you do not depend on it directly.
Second, the trusted folder. The default user store lives in the per-user configuration folder for node-opcua-default, in a subfolder named UserPKI. On Linux that is usually ~/.config/node-opcua-default/UserPKI. Look at the certificates in its trusted folder. Every file there is a user certificate the server accepts. Remove the ones you did not add, then restart the server.
Third, if your server has write access to anything that matters and was reachable from an untrusted network, review its audit log for certificate logins you do not recognise.
Timeline
- 23 Nov 2021node-opcua 2.60.0 is published. It is the oldest release we read, and it already has the default.
- 6 Nov 2026The maintainers commit the fix and publish 2.187.23.
- 7 Nov 2026CyberXYZ's monitoring of fix commits flags the change as security-relevant. An analyst confirms it.
- 9 Nov 2026We report privately to the maintainers through GitHub and ask for an advisory, with 23 November 2026 as our publication date.
- 10 Nov 2026The maintainers close the report without publishing an advisory.
- 23 Nov 2026This post.
Why we are writing about a fixed bug
The fix is good and it was fast. The gap is in what happened next. Dependency scanners match on advisory and CVE identifiers. Without one, a team on 2.187.22 sees a clean report and has no reason to upgrade, and a team that did upgrade has no reason to look in the trusted folder.
The maintainers may well see this as tightening a development default, not a vulnerability, and that is their call to make. We think people who run these servers in plants and buildings should know about it either way.
The project has published advisories for other bugs, and none of them covers this default. One is worth reading alongside this post: GHSA-65c3-pff5-j8cp, in node-opcua-pki, names automatic acceptance of unknown certificates as one way a hostile certificate reaches the trusted store. It is fixed in node-opcua-pki 6.22.1.
What CyberXYZ does about it
We rate this High. We track it in CyberXYZ Advisories, our list of security fixes that shipped before any advisory. Our record is not public yet, so this post is the public notice.
We also want to be plain about our own product: on 23 November 2026, CyberXYZ Check returned "allow" for node-opcua 2.187.22 and for node-opcua-certificate-manager 2.187.22, because our record is not public yet.
We read the fix commit and the source of node-opcua-certificate-manager and node-opcua-server at the 2.187.22 tag on 21 November 2026, and checked six earlier tags (2.60.0, 2.100.0, 2.130.0, 2.150.0, 2.170.0, 2.187.0) for the same default. We ran nothing against any server. The bug was fixed by the node-opcua maintainers; our part was recognising that the fix needed an advisory.
References
- node-opcua, commit de4702df, "fix(certificate-manager): default user PKI rejects unknown certificates", 6 Nov 2026
- CyberXYZ, read of node-opcua source at tags v2.60.0 to v2.187.23, npm registry publish dates and download counts, OSV query, and CyberXYZ Check verdicts, 21 Nov 2026
- MITRE, CWE-295: Improper Certificate Validation