CVE-2026-123867
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, and it is widely used for web applications and server-side development.
An authorization bypass vulnerability (CVE-2026-123867) has been identified in the Node.js tls module, which allows attackers holding a client certificate trusted for a server's default hostname to complete mutual TLS with a protected hostname that requires a different client-certificate CA. When a TLS server gives a hostname its own client CA with server.addContext(host, { ca }) but no server certificate, that CA is never installed and the handshake falls back to the default context's CA.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions.
This issue affects multiple versions of Node.js.
Details
Module Info
- Product: Node.js
- Affected packages:
node - Affected versions: <22.23.5, >=23.0.0 <24.22.3, >=25.0.0 <26.13.1
- GitHub repository: https://github.com/nodejs/node
- Published packages: https://github.com/nodejs/node/releases/tag/v12.22.12, https://github.com/nodejs/node/releases/tag/v14.21.3, https://github.com/nodejs/node/releases/tag/v16.20.2, https://github.com/nodejs/node/releases/tag/v18.20.8, https://github.com/nodejs/node/releases/tag/v20.20.2
- Package manager: Not applicable. Node.js is distributed as runtime builds from nodejs.org rather than as a published npm package.
- Fixed in:
- OSS Node.js 22.23.5, 24.22.3, 26.13.1
- NES for Node.js v12.22.22, v14.21.15, v16.20.17, v18.20.21, v20.20.6
Vulnerability Info
This Medium-severity vulnerability is found in the node package in multiple versions of Node.js. A TLS server can serve hostname-specific settings through Server Name Indication (SNI) contexts registered with server.addContext(hostname, context). When a server requires client certificates (requestCert: true and rejectUnauthorized: true), an SNI context that sets ca is meant to replace the default context's trust store for client certificates presented to that hostname.
After the SNI callback selects a context, CertCbDone in the native TLS layer (src/crypto/crypto_tls.cc; src/node_crypto.cc on the 12.x and 14.x lines) applies it as follows:
if (cons->HasInstance(ctx)) {
SecureContext* sc = Unwrap<SecureContext>(ctx.As<Object>());
CHECK_NOT_NULL(sc);
// Store the SNI context for later use.
w->sni_context_ = BaseObjectPtr<SecureContext>(sc);
if (UseSNIContext(w->ssl_, w->sni_context_) && !w->SetCACerts(sc)) {
// Not clear why sometimes we throw error, and sometimes we call
// onerror(). Both cause .destroy(), but onerror does a bit more.
unsigned long err = ERR_get_error(); // NOLINT(runtime/int)
return ThrowCryptoError(env, err, "CertCbDone");
}
}
SetCACerts, which installs the SNI context's certificate store and client CA list, only runs when UseSNIContext succeeds, and UseSNIContext fails for a context that has no server certificate. A context added as server.addContext('protected.example', { ca: protectedCA }) therefore never has its CA applied, and the failure is silently ignored. The handshake continues with the default context's client CA, so a client whose certificate was issued by the default CA, but not by the protected CA, completes mutual TLS to the protected hostname and can read its responses, while a client with a certificate from the protected CA is rejected. The CVSS 3.0 base score is 4.2 (CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N).
Mitigation
Node.js release lines prior to v22 are End-of-Life and will not receive any upstream updates to address this issue. For more information see here. The odd-numbered Node.js 23.x and 25.x lines covered by the affected ranges are End-of-Life as well.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a supported Node.js release that carries the fix (v22.23.5, v24.22.3 or v26.13.1 or later).
- Migrate affected applications away from the End-of-Life Node.js release lines.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- aur0r4_glyph (finder)