CVE-2026-109383: undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
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 undiciThen 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
tlsoption, such ascheckServerIdentityfor pinning, lose protection. Default certificate validation still works.- Does passing options through connect avoid the bug?
Yes. The advisory says options passed through
connectare not affected, and names that as a workaround. For proxiedEnvHttpProxyAgentdestinations userequestTlsorproxyTls.- 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
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2026-109383
- https://github.com/nodejs/undici/commit/04cb74b1db131ff8f5b4557dce811cbf5f4664b4
- https://github.com/nodejs/undici/commit/8c59f6b302898cb2e9b0f7962cd7212b6e597c9f
- https://github.com/nodejs/undici/commit/f75eac00ac177f7b2e6c8bfbd52d4113164286e6
- https://cna.openjsf.org/security-advisories.html
- https://github.com/nodejs/undici/releases/tag/v6.29.1
- https://github.com/nodejs/undici/releases/tag/v7.30.1
- https://github.com/nodejs/undici/releases/tag/v8.12.2
- https://github.com/advisories/GHSA-2m5v-pch6-74hx
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 entriesCVE-2026-109829
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
high7.4Oct 27, 2026CVE-2026-109855
undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
high7.5Oct 27, 2026CVE-2026-109932
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
medium5.9Oct 27, 2026CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
high7.5Oct 27, 2026CVE-2026-87029
undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
medium5.9Oct 27, 2026CVE-2026-109841
undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens
medium5.9Oct 23, 2026
