REDHAT-BUG-2490024: High severity npm/undici vulnerability
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 PR #4385 and affects all versions through 8.1.0.
Patches: Upgrade to undici v7.26.0 or v8.2.0.
Workarounds: Use a separate Socks5ProxyAgent instance per origin, or avoid using Socks5ProxyAgent with multiple origins.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
undicito a version that resolves this vulnerability.Fixed in 7.26.0 - Upgrade
Upgrade
undicito a version that resolves this vulnerability.Fixed in 8.2.0 - Configuration
Use a separate Socks5ProxyAgent instance per origin (instead of sharing a single agent/dispatcher across multiple origins) to avoid cross-origin request routing.
undici/Socks5ProxyAgent connection_pool_origin_binding = per-origin - Compensating control
Avoid using Socks5ProxyAgent with multiple origins (e.g., route each origin separately or use a proxy mechanism that preserves origin-to-pool mapping).
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2490024?
The severity of REDHAT-BUG-2490024 is classified as high with a score of 7.
How do I fix REDHAT-BUG-2490024?
To fix REDHAT-BUG-2490024, ensure you update to a patched version of npm/undici that resolves the connection pool issue.
What impact does REDHAT-BUG-2490024 have on my application?
REDHAT-BUG-2490024 can lead to unintended data exposure or manipulation due to improper handling of connections across different origins.
Is REDHAT-BUG-2490024 necessary to address immediately?
Yes, due to its high severity, REDHAT-BUG-2490024 should be addressed immediately to mitigate potential security risks.
What software is affected by REDHAT-BUG-2490024?
The software affected by REDHAT-BUG-2490024 is npm/undici.