NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-109383: undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent

highCVSS 3.1 7.4GHSA-2m5v-pch6-74hx

undici's `Agent` silently drops function-valued `tls` options such as a custom `checkServerIdentity`, so certificate or public-key pinning is not enforced. A man-in-the-middle holding a certificate that passes Node's default checks can intercept traffic. Apps that pin through `tls` are affected. Fixed in undici 6.29.1, 7.30.1 and 8.12.2.

Published Oct 27, 2026 · Analysis Nov 1, 2026

What an attacker can do

Agent copies its constructor options with JSON.parse(JSON.stringify(...)) before passing them to each per-origin Pool. JSON cannot hold functions, so a checkServerIdentity callback inside tls disappears. The connection then uses only Node's default hostname and chain checks.

This matters because Agent is the default dispatcher behind request, fetch and setGlobalDispatcher. EnvHttpProxyAgent is also affected on its direct and NO_PROXY routes, because it delegates to an internal Agent.

Only code that passes a function in tls is exposed, typically for certificate or public-key pinning. The attacker needs a network position to intercept traffic and a certificate that the default checks accept, which is why the CVSS vector rates complexity high. With that, they can read and alter the traffic (high confidentiality and integrity impact). Passing the same options through connect is not affected. This is the Agent counterpart of the BalancedPool bypass fixed in CVE-2026-84961.

Who is affected

undici from 4.0.0 before 6.29.1, from 7.0.0 before 7.30.1, and from 8.0.0 before 8.12.2. You are exposed only if you build an Agent or EnvHttpProxyAgent with a tls option that contains a function. Check the installed version:

npm ls undici

Then search your code for checkServerIdentity inside tls options. Remember that Node's built-in fetch bundles its own undici, so look at the Node release too.

undici

Ecosystem
npm
Affected
>= 4.0.0, < 6.29.1
Fixed in
6.29.1
Check
npm ls undici

undici

Ecosystem
npm
Affected
>= 7.0.0, < 7.30.1
Fixed in
7.30.1
Check
npm ls undici

undici

Ecosystem
npm
Affected
>= 8.0.0, < 8.12.2
Fixed in
8.12.2
Check
npm ls undici

How to fix it

Upgrade to undici 6.29.1, 7.30.1 or 8.12.2, matching your major line:

npm install [email protected]

The fix keeps tls outside the JSON clone, so callbacks reach each origin unchanged.

Workarounds from the advisory: pass the TLS options through connect instead of tls. For proxied EnvHttpProxyAgent destinations, use requestTls or proxyTls.

How to tell if you were hit

The advisory lists no indicators of compromise. A bypass leaves no error, since the connection succeeds. Audit instead: check lockfiles and deployed images for vulnerable undici versions, and grep for Agent or EnvHttpProxyAgent constructors with tls: { checkServerIdentity }. To test, point a pinned client at a server with a valid but non-pinned certificate. A patched build must reject it.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

undici's Agent passes its constructor options through a JSON-based deep clone (JSON.parse(JSON.stringify(...))) before forwarding them to each per-origin Pool. JSON cannot represent functions, so a caller-supplied tls option containing a checkServerIdentity callback is silently dropped before it reaches the TLS layer. As a result, a TLS peer whose certificate a custom checkServerIdentity was written to reject, but which passes Node's default hostname and chain checks, is silently accepted when the request is made through Agent. Because Agent is the default dispatcher behind request, fetch, and setGlobalDispatcher, this is the path most applications use. EnvHttpProxyAgent is also affected on its direct and NO_PROXY routes, which delegate to an internal Agent.

Only applications that pass a function-valued tls option (such as a custom checkServerIdentity for certificate or public-key pinning) are affected. Passing the same options through connect is not affected. This is the Agent counterpart of the BalancedPool certificate validation bypass fixed in CVE-2026-84961.

Patches

Upgrade to undici 6.29.1, 7.30.1, or 8.12.2. Agent now preserves the tls option outside the JSON clone, so custom TLS verification callbacks are forwarded to each origin unchanged.

Workarounds

Pass the TLS options through connect instead of tls. For proxied EnvHttpProxyAgent destinations, use requestTls / proxyTls.

Credited to euriconicacio, BlueN0r, ksanjeev284, mcollina, UlisesGascon.

Questions

Am I affected if I never set a custom checkServerIdentity?

No. Only applications that pass a function-valued tls option, such as checkServerIdentity for pinning, lose protection. Default certificate validation still works.

Does passing options through connect avoid the bug?

Yes. The advisory says options passed through connect are not affected, and names that as a workaround. For proxied EnvHttpProxyAgent destinations use requestTls or proxyTls.

Is CVE-2026-109383 exploited in the wild?

The advisory does not mention exploitation or a public exploit, and the entry has no KEV listing. Exploitation needs a man-in-the-middle position and a certificate that passes default checks.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More npm vulnerabilities

All npm entries