CVE-2026-6734: Undici Undici Vulnerable To Cross-origin Request Vulnerability

HIGH
Advisory Identifier: GHSA-hm92-r4w5-c3mj
CVSS 7.5
CWE-346
Published
Advisory Summary

CVE-2026-6734 is a HIGH (CVSS 7.5) undici vulnerable to cross-origin request vulnerability (CWE-346: Origin Validation Error) affecting Undici libraries in the npm ecosystem. The issue involves undici vulnerable to cross-origin request routing via socks5 proxy pool reuse. Remediation is available by upgrading affected packages to version 7.28.0, 8.2.0.

CVE-2026-6734 at a Glance

CVE Identifier CVE-2026-6734
GHSA Identifier GHSA-hm92-r4w5-c3mj
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-346: Origin Validation Error
Affected Product Undici
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2026-6734

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.2.0
npm install undici@8.2.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-6734, 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-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. 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 When using `Socks5ProxyAgent`, undici reuses a single connection pool across different origins without verifying that the pool's origin matches the requested origin. All requests are dispatched through the pool connected to the first origin, regardless of the intended destination. This causes cross-origin request routing: credentials and request data intended for origin B are sent to origin A, responses from the wrong origin are trusted, and HTTPS requests may be silently downgraded to HTTP. Impacted users are applications that use `Socks5ProxyAgent` (directly or via `setGlobalDispatcher`) and make requests to more than one origin. This was introduced in undici 7.23.0 via [#4385](https://github.com/nodejs/undici/pull/4385) and affects all versions through 8.1.0. ## Patches Upgrade to undici v7.28.0 or v8.2.0 ## Workarounds Use a separate `Socks5ProxyAgent` instance per origin, or avoid using `Socks5ProxyAgent` with multiple origins.

CVE-2026-6734 Affected Undici Versions

2 component(s)
Fixed Versions:
7.28.08.2.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.2.0
8.2.0

References

Frequently Asked Questions

What is CVE-2026-6734?
CVE-2026-6734 is a security vulnerability in Undici involving undici vulnerable to cross-origin request routing via SOCKS5 proxy pool reuse under CWE-346: Origin Validation Error.
Which Undici versions are affected?
Affected versions include releases prior to 7.28.0, 8.2.0 across affected packages: undici.
What version fixes CVE-2026-6734?
Upgrading to 7.28.0, 8.2.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.2.0. Upgrade your dependency to 7.28.0, 8.2.0 or later.
What is the CVSS score of CVE-2026-6734?
CVE-2026-6734 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-6734?
CVE-2026-6734 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check npm dependencies for CVE-2026-6734?
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-hm92-r4w5-c3mj",
  "modified" : "2026-06-19T14:20:20Z",
  "published" : "2026-06-19T14:20:20Z",
  "aliases" : [ "CVE-2026-6734" ],
  "summary" : "undici vulnerable to cross-origin request routing via SOCKS5 proxy pool reuse",
  "details" : "## Impact\n\nWhen using `Socks5ProxyAgent`, undici reuses a single connection pool across different origins without verifying that the pool's origin matches the requested origin. All requests are dispatched through the pool connected to the first origin, regardless of the intended destination.\n\nThis causes cross-origin request routing: credentials and request data intended for origin B are sent to origin A, responses from the wrong origin are trusted, and HTTPS requests may be silently downgraded to HTTP.\n\nImpacted users are applications that use `Socks5ProxyAgent` (directly or via `setGlobalDispatcher`) and make requests to more than one origin.\n\nThis was introduced in undici 7.23.0 via [#4385](https://github.com/nodejs/undici/pull/4385) and affects all versions through 8.1.0.\n\n## Patches\n\nUpgrade to undici v7.28.0 or v8.2.0\n\n## Workarounds\n\nUse a separate `Socks5ProxyAgent` instance per origin, or avoid using `Socks5ProxyAgent` with multiple origins.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "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.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/security/advisories/GHSA-hm92-r4w5-c3mj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-6734"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/pull/5041"
  }, {
    "type" : "WEB",
    "url" : "https://cna.openjsf.org/security-advisories.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nodejs/undici"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T14:20:20Z",
    "nvd_published_at" : "2026-06-17T18:18:05Z"
  }
}