CVE-2026-123877

Authorization Bypass
Affects
node
in
Node.js
No items found.
Versions
<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-123877) has been identified in the Node.js https.Agent, which allows attackers to bypass certificate validation by having a TLS session authenticated under one CA policy reused by a later request made under a stricter CA policy. The later request reports the server as authorized and sends its data to a server that its own CA policy would reject on a fresh connection.

Per OWASP: Confirmation of the user's identity, authentication, and session management is critical to protect against authentication-related attacks. OWASP maps CWE-295, Improper Certificate Validation, to this category.

This issue affects multiple versions of Node.js.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the node package in multiple versions of Node.js. An https.Agent pools sockets and caches TLS sessions under a key built by Agent.prototype.getName(). When a new connection is created, the agent looks up a cached session with this._getSession(options._agentKey) and offers it for resumption, then stores the negotiated session with this._cacheSession(options._agentKey, session). The key is meant to separate requests whose TLS policies differ, but getName() appends the certificate authority, certificate and CRL options by plain string concatenation:

Agent.prototype.getName = function getName(options = kEmptyObject) {
  let name = FunctionPrototypeCall(HttpAgent.prototype.getName, this, options);
  name += ':';
  if (options.ca)
    name += options.ca;
  name += ':';
  if (options.cert)
    name += options.cert;
  // ...
  name += ':';
  if (options.crl)
    name += options.crl;
  // ...
};

A request that omits ca appends nothing, while a request that passes ca: [] passes the truthiness check and appends the empty array, which stringifies to an empty string. Both requests therefore get the same agent key, even though their policies differ: omitting ca validates the server against the default trust store, while supplying ca replaces that store. A TLS session authenticated under the broader default policy is then handed to a connection made under the stricter ca: [] policy, and TLS 1.3 session resumption carries the earlier authentication forward. The second request reports authorized === true and transmits its data to a server it would reject on a fresh handshake. The same concatenation lets other distinct values collapse to one key, and the key leaves out TLS options that change the trust or identity policy, such as secureContext, allowPartialTrustChain, ALPNProtocols, minDHSize, pskCallback and session.

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 23.x and 25.x release 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

  • aegis1337 (finder)
  • mickeyjoe (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-123877
PROJECT Affected
node
Versions Affected
<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.