CVE-2026-109383 in undiciinfo

Summary

by MITRE • 10/15/2026

undici is an HTTP client library for Node.js. In versions 4.0.0 through 6.29.0, 7.0.0 through 7.30.0, and 8.0.0 through 8.12.1, its Agent dispatcher passes its constructor options through a JSON-based deep clone before forwarding them to each per-origin pool, and because JSON cannot represent functions, 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. Because Agent is the default dispatcher behind request, fetch, and setGlobalDispatcher, this affects the path most applications use, and EnvHttpProxyAgent is affected on its direct and no-proxy routes as well, while only applications that pass a function-valued tls option such as a custom checkServerIdentity for certificate or public-key pinning are at risk. The issue is fixed in undici 6.29.1, 7.30.1, and 8.12.2, which preserve the tls option outside the JSON clone so custom verification callbacks are forwarded unchanged, and users should upgrade to one of those versions or later. As a workaround, pass the TLS options through connect instead of tls, or for proxied destinations use requestTls and proxyTls.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 10/15/2026

The vulnerability identified in undici, an HTTP client library for Node.js, represents a critical flaw in how transport layer security configurations are handled during object serialization. In versions ranging from 4.0.0 through 6.29.0, 7.0.0 through 7.30.0, and 8.0.0 through 8.12.1, the Agent dispatcher employs a JSON-based deep clone mechanism to process constructor options before forwarding them to per-origin pools. This architectural decision introduces a significant security gap because the JavaScript Object Notation format is inherently incapable of representing function types. Consequently, when an application supplies TLS configuration options that include a custom checkServerIdentity callback, this critical component is silently dropped during the cloning process. The resulting object passed to the underlying TLS layer lacks the necessary verification logic, effectively reverting the connection behavior to default Node.js checks and bypassing any custom security policies defined by the developer.

This flaw directly impacts applications relying on undici as their primary HTTP client, which includes those using request, fetch, or setGlobalDispatcher interfaces. The operational impact is severe for systems that implement certificate pinning or public-key pinning strategies to mitigate man-in-the-middle attacks. If a custom checkServerIdentity function was configured to reject specific certificates or keys based on organizational security policies, the silent removal of this callback means those restrictions are no longer enforced. A TLS peer presenting a certificate that would have been rejected by the custom logic but passes Node.js default hostname and chain validation checks will be accepted without error. This creates a scenario where an attacker could potentially intercept traffic using a validly signed certificate from a trusted public Certificate Authority, thereby bypassing strict pinning controls intended to prevent such interception.

The vulnerability is particularly dangerous because it operates silently. There are no warnings or errors thrown when the function callback is dropped during serialization, leading developers to believe their security configurations are active and enforced. This affects not only direct connections but also EnvHttpProxyAgent on its direct and no-proxy routes. Applications that do not pass a function-valued tls option remain unaffected, as they rely solely on standard TLS verification which continues to operate correctly. However, for those implementing advanced security measures like certificate pinning, the integrity of their transport layer is compromised without explicit indication from the library itself. This aligns with CWE-20 Improper Input Validation and CWE-759 Use of a One-Way Hash without a Salt in contexts where data transformation leads to loss of critical functionality, though more accurately it reflects CWE-1384 Insecure Initialization which results in weakened security controls due to improper handling of configuration objects.

Mitigation requires immediate action by upgrading undici to version 6.29.1, 7.30.1, or 8.12.2 and later. These patched versions modify the internal logic to preserve TLS options outside the JSON clone process, ensuring that custom verification callbacks are forwarded unchanged to the TLS layer. For organizations unable to upgrade immediately, a workaround involves passing TLS options through the connect property instead of tls when configuring connections. Additionally, for proxied destinations, developers should utilize requestTls and proxyTls properties which do not suffer from this serialization flaw. This vulnerability highlights the risks associated with using JSON-based cloning in security-sensitive contexts where function references are essential components of configuration objects. Security teams must audit their use of undici to ensure that any custom TLS verification logic is either upgraded or restructured to avoid reliance on serializable representations for critical security parameters.

Responsible

Openjs

Reservation

10/12/2026

Disclosure

10/15/2026

Moderation

accepted

EPSS

0.00180

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!