# CVE-2026-58040: Security feature bypass in node

> Node.js HTTPS Agent fails to verify hostnames during TLS session reuse, allowing attackers to bypass identity verification checks.

- **Severity:** Medium 6.3 (`CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Jul 2026
- **Updated:** 30 Jul 2026
- **Also known as:** ALPINE-CVE-2026-58040, AZL-94349, BELL-CVE-2026-58040, BIT-node-2026-58040, BIT-node-min-2026-58040, CLEANSTART-2026-DG35822, DEBIAN-CVE-2026-58040, ECHO-b33f-784d-6b12, GHSA-r5cq-rcm7-54x2, MINI-fq24-qfjh-6wv4, MINI-gh8v-r6g9-9r9f, MINI-h4jq-52xg-xg3q, MINI-rx5r-c5fq-2mh4, MINI-vc5x-gj63-6vg9, MINI-whrr-r9wh-c396, MINI-wwv8-54r9-hjcx, MINI-xc6x-w526-xp4q, UBUNTU-CVE-2026-58040

## What is CVE-2026-58040?

CVE-2026-58040 is a medium-severity vulnerability in nodejs node, published on 30 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

An incomplete fix has been identified in Node.js: HTTPS Agent TLS session reuse skips hostname verification across identity policies (incomplete fix of CVE-2026-48934).

This vulnerability affects Node.js **22.x**, **24.x**, and **26.x**.

Weakness: CWE-297 (Improper Validation of Certificate with Host Mismatch)

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

2 open source packages ship an affected version, including node and node-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node` | Bitnami | All versions | 22.23.2, 24.18.1, 26.5.1 |
| `node-min` | Bitnami | All versions | 22.23.2, 24.18.1, 26.5.1 |

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

Upgrade node to a fixed version for your release line: 22.23.2, 24.18.1 or 26.5.1.

## Is CVE-2026-58040 being exploited?

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

Public exploit code:

- Offline Node.js evidence checker for CVE-2026-58040: HTTPS Agent TLS session identity-policy bypass. Single-file Python; JSON/CSV/HTML reports; no exploit payloads. (github_poc): https://github.com/CompleteTech-Security/node-cve-2026-58040-check

## Fix prompt for AI coding agents

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

What it is: CVE-2026-58040 is a medium-severity vulnerability in nodejs node, published on 30 Jul 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-58040 in the wild and no public exploit code.

Affected packages and fixed versions:
- node (Bitnami): affected all versions; fixed in 22.23.2, 24.18.1, 26.5.1
- node-min (Bitnami): affected all versions; fixed in 22.23.2, 24.18.1, 26.5.1

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.
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-58040/ (Markdown: https://insights.sbomify.com/CVE-2026-58040/index.md)
```

## Sources

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

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