GHSA-2m5v-pch6-74hx: High severity npm/undici vulnerability

Published Oct 27, 2026
·
Updated

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 NOPROXY 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.

Affected Software

3 affected componentsFixes available
npm/undici>=8.0.0<8.12.2
8.12.2
npm/undici>=7.0.0<7.30.1
7.30.1
npm/undici>=4.0.0<6.29.1
6.29.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 8.12.2
  2. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 7.30.1
  3. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 6.29.1
  4. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 6.29.1
  5. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 7.30.1
  6. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 8.12.2
  7. Configuration

    Pass TLS options through connect instead of tls; for proxied EnvHttpProxyAgent destinations, use requestTls or proxyTls.

    undici Agent TLS option forwarding = connect; requestTls/proxyTls for proxied EnvHttpProxyAgent destinations

Event History

Oct 27, 2026
Advisory Published
via GitHub·07:02 PM
Data Sourced
via GitHub·07:02 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed?

Only applications that supply a function-valued tls option, such as a custom checkServerIdentity callback used for certificate or public-key pinning, are affected. Applications using Agent through request, fetch, or setGlobalDispatcher may be exposed because Agent is their default dispatcher.

2

What must an attacker be able to do for the validation bypass to matter?

The TLS peer must present a certificate that passes Node's default hostname and certificate-chain checks but would have been rejected by the application's custom checkServerIdentity callback. The issue causes that callback to be silently omitted when requests use Agent.

3

Are proxy configurations affected, and is every connection path vulnerable?

EnvHttpProxyAgent is affected on its direct and NO_PROXY routes because those routes delegate to an internal Agent. Supplying the same tls options through connect is not affected.

4

What version should be deployed to remediate this issue?

Upgrade undici to version 6.29.1, 7.30.1, or 8.12.2.

5

How can teams identify whether they are affected before upgrading?

Review code and dependency configuration for Agent or EnvHttpProxyAgent usage combined with a tls.checkServerIdentity function. Focus on request, fetch, and setGlobalDispatcher call paths, and distinguish them from connections configured through connect.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203