CVE-2026-9697: Undici Undici Vulnerable To TLS Certificate Vulnerability

HIGH
Advisory Identifier: GHSA-vmh5-mc38-953g
CVSS 7.4
CWE-295
Published
Advisory Summary

CVE-2026-9697 is a HIGH (CVSS 7.4) undici vulnerable to tls certificate vulnerability (CWE-295: Improper Certificate Validation) affecting Undici libraries in the npm ecosystem. The issue involves undici vulnerable to tls certificate validation bypass via dropped requesttls in socks5 proxyagent. Remediation is available by upgrading affected packages to version 7.28.0, 8.5.0.

CVE-2026-9697 at a Glance

CVE Identifier CVE-2026-9697
GHSA Identifier GHSA-vmh5-mc38-953g
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Undici
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-9697

To remediate this vulnerability, upgrade all affected Undici dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

undici fixed: 7.28.0
npm install undici@7.28.0
undici fixed: 8.5.0
npm install undici@8.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls undici

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-9697, inspect your project dependencies using npm:

npm ls undici

Analyze the terminal output to locate any version of Undici in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.28.0), your application is affected.

Note: The npm ls undici command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Undici, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Impact undici's `ProxyAgent` silently drops the `requestTls` option when configured with a SOCKS5 proxy URI (`socks5://` or `socks://`). The target HTTPS connection through the SOCKS5 tunnel falls back to Node's default trust store, ignoring user-configured `ca`, `cert`, `key`, `rejectUnauthorized`, and `servername` settings. Applications that pin to an internal or corporate CA via `requestTls.ca` will, when their proxy URI is SOCKS5, get the default Mozilla CA bundle as the trust anchor instead. Any cert signed by any publicly-trusted CA for the target hostname is accepted, breaking the intended pin and enabling MITM read and tamper of the HTTPS exchange. Affected applications are those that use undici's `ProxyAgent` (or `Socks5ProxyAgent` directly) with SOCKS5 AND rely on `requestTls` for TLS scope restriction. The bug was introduced in undici 7.23.0 when SOCKS5 support was added. ## Patches Upgrade to undici v7.28.0 or v8.5.0. ## Workarounds No workaround is available within the SOCKS5 path. If a SOCKS5 proxy with TLS scope restriction is required and an upgrade is not yet possible, route the traffic through an HTTP-proxy `ProxyAgent` instead, where `requestTls` is honored correctly.

CVE-2026-9697 Affected Undici Versions

2 component(s)
Fixed Versions:
7.28.08.5.0
Product / Package Ecosystem Affected Versions Fixed Version
undici
npm
≥ 7.23.0
< 7.28.0
7.28.0
undici
npm
≥ 8.0.0
< 8.5.0
8.5.0

References

Frequently Asked Questions

What is CVE-2026-9697?
CVE-2026-9697 is a security vulnerability in Undici involving undici vulnerable to TLS certificate validation bypass via dropped requestTls in SOCKS5 ProxyAgent under CWE-295: Improper Certificate Validation.
Which Undici versions are affected?
Affected versions include releases prior to 7.28.0, 8.5.0 across affected packages: undici.
What version fixes CVE-2026-9697?
Upgrading to 7.28.0, 8.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is undici affected?
Yes, undici is affected in releases prior to 7.28.0, 8.5.0. Upgrade your dependency to 7.28.0, 8.5.0 or later.
What is the CVSS score of CVE-2026-9697?
CVE-2026-9697 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-9697?
CVE-2026-9697 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check npm dependencies for CVE-2026-9697?
Run the dependency tree command: 'npm ls undici'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vmh5-mc38-953g",
  "modified" : "2026-06-18T14:28:21Z",
  "published" : "2026-06-18T14:28:21Z",
  "aliases" : [ "CVE-2026-9697" ],
  "summary" : "undici vulnerable to TLS certificate validation bypass via dropped requestTls in SOCKS5 ProxyAgent",
  "details" : "## Impact\n\nundici's `ProxyAgent` silently drops the `requestTls` option when configured with a SOCKS5 proxy URI (`socks5://` or `socks://`). The target HTTPS connection through the SOCKS5 tunnel falls back to Node's default trust store, ignoring user-configured `ca`, `cert`, `key`, `rejectUnauthorized`, and `servername` settings.\n\nApplications that pin to an internal or corporate CA via `requestTls.ca` will, when their proxy URI is SOCKS5, get the default Mozilla CA bundle as the trust anchor instead. Any cert signed by any publicly-trusted CA for the target hostname is accepted, breaking the intended pin and enabling MITM read and tamper of the HTTPS exchange.\n\nAffected applications are those that use undici's `ProxyAgent` (or `Socks5ProxyAgent` directly) with SOCKS5 AND rely on `requestTls` for TLS scope restriction. The bug was introduced in undici 7.23.0 when SOCKS5 support was added.\n\n## Patches\n\nUpgrade to undici v7.28.0 or v8.5.0.\n\n## Workarounds\n\nNo workaround is available within the SOCKS5 path. If a SOCKS5 proxy with TLS scope restriction is required and an upgrade is not yet possible, route the traffic through an HTTP-proxy `ProxyAgent` instead, where `requestTls` is honored correctly.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.23.0"
      }, {
        "fixed" : "7.28.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/security/advisories/GHSA-vmh5-mc38-953g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-9697"
  }, {
    "type" : "WEB",
    "url" : "https://cna.openjsf.org/security-advisories.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nodejs/undici"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-18T14:28:21Z",
    "nvd_published_at" : "2026-06-17T18:18:06Z"
  }
}