# CVE-2026-123877: Node.js is vulnerable to a certificate validation bypass in https.Agent via cross-policy TLS session reuse

> Node.js apps using https.Agent may send TLS data to a server whose policy rejects it, because session reuse skips stricter CA checks.

- **Severity:** Medium 6.8 (`CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** Yes (`https.Agent.prototype.getName()`)
- **Fix available:** Yes
- **Published:** 11 Nov 2026
- **Updated:** 11 Nov 2026
- **Also known as:** ALPINE-CVE-2026-123877, BELL-CVE-2026-123877, DEBIAN-CVE-2026-123877, GHSA-4g6g-xjc7-fh73, UBUNTU-CVE-2026-123877

## What is CVE-2026-123877?

CVE-2026-123877 is a medium-severity security feature bypass vulnerability in nodejs node, published on 11 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A certificate validation bypass in Node.js https.Agent lets a cached TLS session authenticated under one CA policy be reused by a later request with a stricter policy. https.Agent.prototype.getName() assigns the same Agent and session-cache key to a request that omits ca and one that explicitly supplies ca: [], because an omitted value appends nothing to the key while an empty array stringifies to an empty string. The two policies differ: omitting ca uses the default trust store, while supplying ca replaces it. Since they share a key, a TLS session authenticated under the broader default policy is handed to a new connection made under the later ca: [] policy, and TLS 1.3 session resumption carries the earlier authentication forward, so the second request reports authorized === true and transmits confidential data to a server its own CA policy would reject on a fresh connection. This vulnerability affects Node.js 26.x, 24.x, and 22.x.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2026-123877?

An affected version is only exploitable if your software calls https.Agent.prototype.getName(). Many projects that include it are not exposed.


## How do I fix CVE-2026-123877?

No fix published yet.

## Is CVE-2026-123877 being exploited?

There is no known exploitation of CVE-2026-123877 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-123877 and fix it if it is affected.

What it is: CVE-2026-123877 is a medium-severity security feature bypass vulnerability in nodejs node, published on 11 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-123877 in the wild and no public exploit code.
Exposure: An affected version is only exploitable if your software calls https.Agent.prototype.getName(). Many projects that include it are not exposed.

Affected product: nodejs node. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
   If an affected version is present, also search the code for calls to https.Agent.prototype.getName() and report whether any exist.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-123877/ (Markdown: https://insights.sbomify.com/CVE-2026-123877/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-123877
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-123877
- OSV: https://osv.dev/vulnerability/CVE-2026-123877

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-123877/
Summaries are generated and may contain mistakes; the official description above is the record.
