Improper Certificate Validation Affecting undici package, versions >=6.14.0 <6.29.2>=7.0.0 <7.30.4>=8.0.0 <8.14.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.41% (38th 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-23775807
  • published5 Dec 2026
  • disclosed5 Dec 2026
  • creditTravis Baldwin

Introduced: 5 Dec 2026

NewCVE-2026-139849  (opens in a new tab)
CWE-295  (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 Improper Certificate Validation via EnvHttpProxyAgent, which fails to apply the application's target TLS options on both direct and proxied routes. Options passed as requestTls are silently dropped when a request goes direct (no proxy configured or host matches NO_PROXY), and options passed as connect are silently dropped when a request is tunnelled through a proxy, causing the TLS connection to the target to fall back to Node.js's default trust store and hostname check, ignoring any custom ca, checkServerIdentity, servername, client certificate, or rejectUnauthorized settings. Because the deployment environment selects the route rather than the application, an attacker who can present a publicly trusted certificate for the target host can intercept connections the application expected to be pinned or restricted to a private CA.

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.

CVSS Base Scores

version 4.0
version 3.1