CVE-2026-141996: undici vulnerable to TLS certificate validation bypass via servername reused on cross-origin redirects

Published Dec 5, 2026
·
Updated

undici is an HTTP client for Node.js. In versions 6.8.0 through 6.29.1, 7.0.0 through 7.30.3, and 8.0.0 through 8.14.0, the redirect interceptor builds each follow-up request from the options of the previous one and, on a cross-origin redirect, kept the TLS servername of the first request, so the redirect target's certificate was validated against the first host's name instead of its own. Applications are affected when they follow redirects with the redirect interceptor and the first request carries a servername, either passed as a request option or set by the dns interceptor composed outside the redirect interceptor, and requests sent through a ProxyAgent tunnel without requestTls are affected in the same way, while fetch is not affected. A party that holds a valid certificate for the first host and can intercept traffic to the redirect target can impersonate the target and read or modify the redirected request and its response. The issue is fixed in undici 6.29.2, 7.30.4, and 8.14.1, and users should upgrade to one of those versions or later. As a workaround, compose the dns interceptor inside the redirect interceptor and do not pass a servername on requests that follow redirects, or disable automatic redirects and follow them in application code.

Affected Software

1 affected component
npm/undici>=6.8.0<=6.29.1, >=7.0.0<=7.30.3, >=8.0.0<=8.14.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 6.29.2
  2. Upgrade

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

    Fixed in 7.30.4
  3. Upgrade

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

    Fixed in 8.14.1

Event History

Dec 5, 2026
CVE Published
via MITRE·09:41 AM
Data Sourced
via MITRE·09:41 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications are affected only when they follow redirects using the redirect interceptor and the initial request has a servername. This can occur when servername is supplied as a request option or when a dns interceptor is composed outside the redirect interceptor; ProxyAgent tunnel requests without requestTls are also affected. The fetch API is not affected.

2

What must an attacker be able to do to exploit it?

The attacker must hold a valid TLS certificate for the original host and be able to intercept traffic to the cross-origin redirect target. They can then impersonate the redirect target and read or alter the redirected request and response.

3

What can be done if an upgrade cannot be applied immediately?

Compose the dns interceptor inside the redirect interceptor, and do not pass a servername on requests that follow redirects. Upgrading to undici 6.29.2, 7.30.4, 8.14.1, or later is the recommended remediation.

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