Skip to content

undici vulnerable to cross-origin request routing via SOCKS5 proxy pool reuse

High severity GitHub Reviewed Published Jun 17, 2026 in nodejs/undici

Package

npm undici (npm)

Affected versions

>= 7.23.0, < 7.28.0
>= 8.0.0, < 8.2.0

Patched versions

7.28.0
8.2.0

Description

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 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.

References

@mcollina mcollina published to nodejs/undici Jun 17, 2026
Published by the National Vulnerability Database Jun 17, 2026
Published to the GitHub Advisory Database Jun 19, 2026
Reviewed Jun 19, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(10th percentile)

Weaknesses

Origin Validation Error

The product does not properly verify that the source of data or communication is valid. Learn more on MITRE.

CVE ID

CVE-2026-6734

GHSA ID

GHSA-hm92-r4w5-c3mj

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.