Insufficiently Protected Credentials Affecting undici package, versions >=5.16.0 <6.29.2>=7.0.0 <7.30.4>=8.0.0 <8.14.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-UNDICI-23775836
  • published5 Dec 2026
  • disclosed5 Dec 2026
  • creditUnknown

Introduced: 5 Dec 2026

NewCVE-2026-144348  (opens in a new tab)
CWE-522  (opens in a new tab)

How to fix?

Upgrade undici to version 6.29.2, 7.30.4, 8.14.1 or higher.

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Insufficiently Protected Credentials via ProxyAgent in lib/dispatcher/proxy-agent.js, which writes proxy credentials (from the auth, token options, or the username and password in the proxy URL) as a proxy-authorization entry directly onto the caller's headers object rather than a copy. Any other agent holding that same object then forwards those credentials to its own proxy. EnvHttpProxyAgent passes the same headers object to both the ProxyAgent it creates for HTTP_PROXY and the one it creates for HTTPS_PROXY, so when the two variables name different proxies, one proxy receives the credentials intended for the other. An application that reuses one headers object across multiple ProxyAgent instances is equally affected, allowing the operator of one proxy to capture credentials meant for another.

Note: This is only exploitable when the headers option is explicitly set on ProxyAgent or EnvHttpProxyAgent.

Workaround

Give each ProxyAgent its own headers object and do not reuse it elsewhere. With EnvHttpProxyAgent, avoid the headers option when HTTP_PROXY and HTTPS_PROXY name different proxies and either one carries credentials; create a separate ProxyAgent for each proxy instead.

CVSS Base Scores

version 4.0
version 3.1