CVE-2026-123872

Authorization Bypass
Affects
node
in
Node.js
No items found.
Versions
>=0.0.0 <22.23.5, >=23.0.0 <24.22.3, >=25.0.0 <26.13.1

Patch Available.

Exclamation circle icon
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-123872) has been identified in the Node.js TLS server, which allows attackers who hold a client certificate accepted for one hostname to reach a hostname with a stricter client-certificate policy. A client that authenticates under a permitted servername can renegotiate the TLS 1.2 connection under a different servername and carry its existing authentication to the protected host.

Per OWASP: Confirmation of the user's identity, authentication, and session management is critical to protect against authentication-related attacks.

This issue affects multiple versions of Node.js.

Details

Module Info

Vulnerability Info

This High-severity vulnerability is found in the node package in multiple versions of Node.js. A Node.js TLS server picks a secure context per hostname through Server Name Indication (SNI), for example with server.addContext() or the SNICallback option, so each hostname can have its own ca, requestCert and client-certificate policy. The native servername callback that applies that choice runs on every ClientHello the server receives, not just the first one on a connection:

int TLSWrap::SelectSNIContextCallback(SSL* s, int* ad, void* arg) {
  TLSWrap* p = static_cast<TLSWrap*>(SSL_get_app_data(s));
  Environment* env = p->env();
  HandleScope handle_scope(env->isolate());
  Context::Scope context_scope(env->context());

  const char* servername = GetServerName(s);
  if (!Set(env, p->GetOwner(), env->servername_string(), servername))
    return SSL_TLSEXT_ERR_NOACK;

  Local<Value> ctx = p->object()->Get(env->context(), env->sni_context_string())
      .FromMaybe(Local<Value>());
  // ...
  SecureContext* sc = Unwrap<SecureContext>(ctx.As<Object>());
  CHECK_NOT_NULL(sc);
  p->sni_context_ = BaseObjectPtr<SecureContext>(sc);

  ConfigureSecureContext(sc);
  CHECK_EQ(SSL_set_SSL_CTX(p->ssl_.get(), sc->ctx().get()), sc->ctx().get());
  p->SetCACerts(sc);

  return SSL_TLSEXT_ERR_OK;
}

Node.js servers accept client-initiated TLS 1.2 renegotiation by default, up to tls.CLIENT_RENEG_LIMIT renegotiations per window. Each renegotiation sends a new ClientHello, and the callback above accepts whatever servername it carries: it overwrites the socket's servername and swaps the connection to that hostname's SSL_CTX with SSL_set_SSL_CTX(), without checking that the name matches the one the connection was established for. A client can therefore complete the initial handshake, including client-certificate authentication, under a hostname whose policy its certificate satisfies, then renegotiate under the servername of a host that requires a different or stricter client certificate. The connection keeps its existing authentication while the application now sees the protected hostname in socket.servername, so routing or access decisions made per hostname apply the weaker policy's authentication to the protected host. Session resumption is not tied to the servername either, so a session established for one hostname can be resumed under another.

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

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2026-123872
PROJECT Affected
node
Versions Affected
>=0.0.0 <22.23.5, >=23.0.0 <24.22.3, >=25.0.0 <26.13.1
NES Versions Affected
Published date
November 23, 2026
≈ Fix date
November 19, 2026
Category
Authorization Bypass
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Node.js
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.