CVE Database›Document archive›CVE-2026-84961

CVE-2026-84961

undici: undici: TLS certificate validation bypass in BalancedPool via dropped connect options

Loading…

Severity

Important

Red Hat Product Security

7.4

CVSS 3.1

Review impact separately from score.

Published · September 5, 2026

Updated · November 5, 2026

Description

A flaw was found in undici's BalancedPool component. This vulnerability allows a remote attacker to bypass Transport Layer Security (TLS) certificate validation. The BalancedPool constructor incorrectly processes its options, silently discarding custom certificate validation functions. Consequently, a peer with an otherwise untrusted certificate may be accepted, potentially compromising the integrity of secure communication.

Statement

This flaw only affects applications that construct an undici BalancedPool with a function-valued connect or tls option — for example, a custom checkServerIdentity callback or connector used for certificate pinning across multiple upstreams. Client, Pool, Agent, and RoundRobinPool destructure these options before the internal JSON-based clone and are not affected. An attacker able to present, on the network path, a TLS endpoint whose certificate the application's custom validator was written to reject — but which still satisfies Node.js's default hostname and chain checks — can have that certificate silently accepted when the connection goes through BalancedPool, enabling a man-in-the-middle attack against affected connections. This affects undici versions from 7.24.1 up to 7.29.1 and from 8.0.0 up to 8.10.2.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Applications that do not use BalancedPool, or that use it without a custom function-valued connect/tls option, are not affected and require no action. As a workaround until packages are updated, avoid using BalancedPool for any connection that relies on custom TLS certificate validation (e.g. certificate pinning); use Client, Pool, or Agent instead, which are unaffected. The permanent fix is upgrading undici to 7.29.1 or later (7.x line) or 8.10.2 or later (8.x line).

CVSS / CWE

CVSS 3.1 · 7.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

CWE-295 · Improper Certificate Validation