CVE-2026-84961
nicheTLS certificate validation bypass in undici BalancedPool via dropped function-valued options
The BalancedPool constructor in the undici HTTP client library deep-clones its options object by serializing and reparsing it as JSON, which silently discards any function-valued TLS options such as a caller-supplied checkServerIdentity callback or a custom connector inside the connect option. An application that relies on such a callback to enforce custom certificate checks will accept a server certificate that the callback was written to reject, provided the certificate still passes Node.js's default hostname and chain checks, enabling server impersonation or man-in-the-middle attacks with confidentiality and integrity impact. Only applications running undici 7.24.1 through 7.29.0 or 8.0.0 through 8.10.1 that pass function-valued connect or tls options to BalancedPool are affected; the Client, Pool, and Agent dispatchers are unaffected because they extract those options before cloning. There is no public proof-of-concept, no report of exploitation in the wild, the CVE is not in CISA's KEV, and EPSS assigns a 0.1% probability of exploitation within 30 days.
What to do: Upgrade undici to 7.29.1 (for the 7.x line) or 8.10.2 (for the 8.x line). As interim mitigations, replace BalancedPool with the unaffected Pool or Agent dispatchers, or avoid passing function-valued connect/tls options (e.g. checkServerIdentity or custom connectors) to BalancedPool. Audit application code and dependencies for BalancedPool usage combined with custom TLS validation callbacks to determine whether custom certificate checks are currently being bypassed.
| undici (Node.js HTTP client project) undici | 7.24.1 up to (but not including) 7.29.1, and 8.0.0 up to (but not including) 8.10.2, when function-valued connect or tls options are supplied to BalancedPool |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
undici's BalancedPool constructor passes its entire options object through an internal deep-clone that serializes and reparses the value as JSON. Because JSON cannot represent functions, any function-valued TLS option, such as a caller-supplied checkServerIdentity callback or a custom connector inside the connect option, is silently discarded before it reaches the TLS layer. As a result a peer whose certificate the application's custom checkServerIdentity was written to reject, but which still passes Node's default hostname and chain checks, is accepted when reached through BalancedPool. The Client, Pool, and Agent dispatchers are not affected because they extract the connect and tls options before cloning. This affects undici versions from 7.24.1 up to 7.29.1 and from 8.0.0 up to 8.10.2, and only when the application supplies a function-valued connect or tls option to BalancedPool. Users should upgrade to undici 7.29.1 or 8.10.2.
- Vendors
- nodejs
- Products
- undici
- Weakness
- CWE-295
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
In the news0 stories
No ingested article mentions this CVE yet.