On this page
Your Node.js application can ask for strict certificate checks and still end up accepting the wrong certificate. The problem is undici (Node.js's default HTTP client) that powers many of the services/tools built on top of Node.js. Two flaws published on December 5, 2026 break the promise in two different ways, and the route a request takes out of the machine decides which one bites.
The first flaw, CVE-2026-141996, is about redirects. When undici follows a redirect to a different site, it builds the follow-up request from the options of the first request. On a cross-origin redirect it kept the TLS servername of the first site, so the second site's certificate was checked against the first site's name instead of its own. A party holding a valid certificate for the first site, who can also intercept traffic to the redirect target, could stand in for the target and read or change the redirected request and its reply. Regular fetch doesn't have the bug. Requests are in scope when they follow redirects with the redirect interceptor and the first request carries a servername, and requests sent through a ProxyAgent tunnel without requestTls are affected the same way.
The second flaw, CVE-2026-139849, is about proxy settings read from the environment. EnvHttpProxyAgent selects between direct and proxy paths for each request, based on the HTTP_PROXY, HTTPS_PROXY and NO_PROXY. Options passed as requestTls were dropped when a request went direct, and options passed as connect were dropped when a request was tunnelled through a proxy. The connection was then made without the application's private certificate authority, pinning check, client certificate or rejectUnauthorized setting, and fell back to the default trust store and hostname check. The same code could enforce a private CA in one deployment and accept any publicly trusted certificate in another, because the environment picked the route.
Neither flaw is marked as exploited, and this is not a remote code execution story. It is quieter than that. The code looks correct on review, the settings are present, and the failure shows up only in the deployment where the route changes. That is the part worth sitting with: a security setting that depends on proxy variables and redirect behaviour is a setting you do not fully control.
Four more undici flaws arrived in the same release train. CVE-2026-138000 and CVE-2026-141997 are denial of service flaws rated high, one through an unhandled exception when resuming tuple-array header requests and one through a reachable assertion in the HTTP/1.1 response parser. CVE-2026-139839, rated medium, can disclose cached responses across users through a Vary header added on background revalidation. CVE-2026-144348, rated low, can disclose proxy credentials through a shared ProxyAgent headers object. All six are fixed by the same upgrade, and the HOL Guard records for the cluster are at https://hol.org/guard/security/cves/CVE-2026-141996-undici-vulnerable-to-tls-certificate-validation and https://hol.org/guard/security/cves/CVE-2026-139849-undici-vulnerable-to-improper-certificate .
What isn't in scope: applications with undici 6.29.2/7.30.4/8.14.1+ or newer, applications which use plain fetch for the redirect case, applications which don't ever pass down their own TLS options and don't ever use a private CA or pinning for the proxy case. If your service gets undici only as part of Node.js and pins no version of its own, check the version your runtime carries. Don't assume the newest Node.js fixed it for you.
One concrete check: run node -e "console.log(require('undici/package.json').version)" in the project, or read the undici entry in your lockfile. If the version sits in 6.8.0 to 6.29.1, 7.0.0 to 7.30.3, or 8.0.0 to 8.14.0, the TLS flaws apply to you. A second check takes a minute: search your codebase and your deployment settings for EnvHttpProxyAgent and for HTTP_PROXY and NO_PROXY. If both show up, the second flaw is the one to read first.
How to fix
Upgrade undici first: npm install undici@^8.14.1 on the 8.x line, undici@^7.30.4 on 7.x, or undici@^6.29.2 on 6.x, then restart the service so the new client is the one making connections. Until the upgrade lands, two workarounds hold for the redirect flaw: compose the dns interceptor inside the redirect interceptor and do not pass a servername on requests that follow redirects, or turn off automatic redirects and follow them in your own code. For the proxy flaw, pass the same target TLS options as both requestTls and connect, or use Agent or ProxyAgent explicitly instead of EnvHttpProxyAgent.
Does the redirect flaw need a man in the middle to matter?
Yes. It does. The advisory is referring to needing someone with a valid cert for the first site, and being able to intercept traffic to the target of the redirect. That's a narrower spot than an unauthenticated remote flaw. It's still worth fixing, because the certificate check exists to stop exactly that party.
Is this being exploited?
No. It's not. KnownExploited is false in both records, and neither CVE is in the CISA KEV list. The reason to move today is that the fix is one upgrade that also clears four more flaws in the same train.
HOL's assessment
HOL's assessment: the two TLS flaws matter most for services that talk to many outside hosts, follow redirects as part of normal work, or run behind corporate proxies. A single undici upgrade closes both, and the version check takes less than a minute, so there is little reason to leave this one open.
This post is the operator write-up. The HOL Guard pages linked above are the source records for each CVE. If your agents and services make outbound calls from Node.js, HOL Guard at https://hol.org/guard watches what those tools do on the machine, and the install page is at https://hol.org/guard/install .