# GHSA-QFV9-2FJM-5P4M: undici vulnerable to proxy credential disclosure via a shared ProxyAgent headers object

- Database: GitHub
- Severity: CVSS 3.7 (Low)
- Published: 2026-12-04
- Modified: 2026-12-04

## Tracked as

- [CVE-2026-144348](https://cve.now/CVE-2026-144348.md): undici proxy credential leak in ProxyAgent headers

## Affected versions

- undici (npm): from 5.16.0, fixed in 6.29.2
- undici (npm): from 7.0.0, fixed in 7.30.4
- undici (npm): from 8.0.0, fixed in 8.14.1

## Description

### Impact

`ProxyAgent` adds the proxy credentials (from `auth`, `token`, or the username and password in the proxy URL) as a `proxy-authorization` entry directly on the `headers` object passed in its options, rather than on a copy. Every other agent holding that same object then sends those credentials to its own proxy, and they stay in the application's object afterwards.

`EnvHttpProxyAgent` hands the same `headers` object to both the `ProxyAgent` it creates for `HTTP_PROXY` and the one it creates for `HTTPS_PROXY`. When an application sets the `headers` option and the two variables name different proxies:

- if only one proxy URL contains credentials, the other proxy receives them with every request it handles;
- if both contain credentials, the `HTTPS_PROXY` credentials overwrite the `HTTP_PROXY` ones, so the HTTP proxy receives the HTTPS proxy's credentials instead of its own.

The same happens when an application passes one `headers` object to several `ProxyAgent` instances. The operator of one proxy can then capture credentials meant for another. Applications that do not use the `headers` option are not affected.

`ProxyAgent` has written credentials into the caller's `headers` object since custom proxy headers were added in undici 5.16.0. `EnvHttpProxyAgent`, available since 6.14.0, shares that object between its two proxies whenever the option is set.

### Patches

Upgrade to undici `6.29.2`, `7.30.4`, or `8.14.1`. `ProxyAgent` now copies the `headers` option before adding credentials, so each agent sends only its own credentials and the application's object is left unchanged.

### Workarounds

Give each `ProxyAgent` its own `headers` object and do not reuse it elsewhere. With `EnvHttpProxyAgent`, do not set 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.

## References

- https://github.com/nodejs/undici/security/advisories/GHSA-qfv9-2fjm-5p4m

Page: https://cve.now/GHSA-QFV9-2FJM-5P4M

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
