CVE-2026-123867: Node.js is vulnerable to a per-host mTLS authorization bypass via a CA-only SNI context failing open to the default CA
A per-host mutual-TLS authorization bypass in Node.js lets a client authorized for the default hostname reach a protected hostname it is not authorized for. When a TLS server assigns a hostname a different client-certificate CA with server.addContext(host, { ca: protectedCA }) but no server certificate in that SNI context, the per-host client CA is never installed and the handshake falls back to the default client CA. In src/crypto/cryptotls.cc, CertCbDone installs the SNI context's CA only when setSniContext succeeds, but setSniContext returns false for a context with no server certificate, so a CA-only SNI context silently keeps the default CA. A client holding a certificate trusted by the default CA, but not the protected CA, can therefore complete mTLS to the protected hostname and read its response even with requestCert and rejectUnauthorized enabled, while a client certified by the protected CA is rejected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 22.23.5 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 26.13.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 24.22.3 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 22.23.5Fixed in 24.22.3Fixed in 26.13.1 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 22.23.5-r0 - Upgrade
Upgrade
alpine/nodejsto a version that resolves this vulnerability.Fixed in 24.22.3-r0
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
Which deployments are exposed to this bypass?
Affected deployments use Node.js 22.x, 24.x, or 26.x and configure per-host mTLS with server.addContext(host, { ca: protectedCA }) for a protected hostname without providing a server certificate in that SNI context. The issue applies even when requestCert and rejectUnauthorized are enabled.
What does an attacker need to exploit the issue?
The attacker needs network access to the TLS service and a client certificate trusted by the server's default client CA. That certificate must not be trusted by the protected hostname's intended CA.
How can I determine whether a hostname is affected?
Review SNI contexts created with server.addContext and identify contexts that set a client CA but omit a server certificate. Test whether a client certificate trusted only by the default CA can successfully complete mTLS and access the protected hostname.
What can be done if patching is not immediately possible?
Avoid CA-only SNI contexts for protected hostnames. Configure a server certificate in each protected hostname's SNI context so the intended per-host client CA is installed, or use a separate TLS server configuration that does not rely on the default client CA.