CVE-2026-144348 in undici
Summary
by MITRE • 12/05/2026
undici is an HTTP client for Node.js. In versions 5.16.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0, ProxyAgent adds the proxy credentials (from the auth or token options, or the username and password in the proxy URL) as a proxy-authorization entry directly on the headers object passed in its options instead of on a copy, so every other agent holding that same object sends those credentials to its own proxy. EnvHttpProxyAgent, available since 6.14.0, passes the same headers object to the agents it creates for HTTP_PROXY and HTTPS_PROXY, so when an application sets the headers option and the two variables name different proxies, one proxy receives the credentials meant for the other. The same happens when an application reuses one headers object across several ProxyAgent instances, letting the operator of one proxy capture credentials intended for another. Applications that do not set the headers option are not affected. The issue is fixed in undici 6.29.2, 7.30.4, and 8.14.1, and users should upgrade to one of those versions or later. As a workaround, give each ProxyAgent its own headers object, and with EnvHttpProxyAgent avoid the headers option when HTTP_PROXY and HTTPS_PROXY name different proxies and either one carries credentials.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 12/05/2026
The vulnerability identified in undici, an HTTP client library for Node.js, represents a critical flaw in how proxy authentication credentials are handled within header objects across multiple versions including 5.16.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0. This issue stems from a fundamental error in object reference management where the ProxyAgent component modifies the headers object passed into its options directly rather than creating an isolated copy. By adding proxy authorization credentials to the original headers object instead of a local instance, the library inadvertently shares sensitive authentication data with other agents that utilize the same header structure. This design flaw creates a scenario where credential leakage occurs not through network interception alone but through internal application logic errors involving shared mutable state.
The operational impact is most severe when using EnvHttpProxyAgent, which was introduced in version 6.14.0 and passes the identical headers object to agents created for both HTTP_PROXY and HTTPS_PROXY environment variables. If an application configures these two proxies to point at different endpoints while also providing credentials via the headers option or URL-based authentication, one proxy will receive the authorization tokens intended for the other. This cross-contamination of credentials allows any operator controlling either proxy server to capture valid authentication details meant exclusively for a separate service. Furthermore, this vulnerability extends beyond environment variable configurations; it affects any application that reuses a single headers object across multiple ProxyAgent instances, thereby enabling an attacker operating one proxy to harvest credentials designated for another distinct proxy destination.
From a security classification perspective, this flaw aligns with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor and CWE-732: Incorrect Permission Assignment for Critical Resource due to the improper handling of shared resources leading to unauthorized access. In terms of attack vectors, it relates to ATT&CK technique T1552.004: Unsecured Credentials, specifically involving credentials in request headers that are inadvertently exposed through misconfigured application logic rather than direct exploitation of a buffer overflow or injection flaw. The severity is heightened by the fact that undici is widely used as a foundational HTTP client in many Node.js applications, meaning this vulnerability can impact a broad range of services if they rely on proxy configurations with authentication requirements.
Applications that do not set the headers option are explicitly noted as unaffected because the leakage mechanism relies entirely on the presence and reuse of shared header objects containing authorization data. To mitigate this risk immediately, developers should ensure that each ProxyAgent instance is provided with its own unique headers object rather than sharing references across multiple instances. When utilizing EnvHttpProxyAgent, it is crucial to avoid setting the headers option if HTTP_PROXY and HTTPS_PROXY are configured to point to different proxies where either or both require authentication credentials. The definitive resolution requires upgrading undici to version 6.29.2, 7.30.4, or 8.14.1 and later, as these releases implement proper isolation of header objects during proxy authorization processing to prevent cross-agent credential leakage.