CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
Description
Impact
undici crashes the client process when a TLS 1.2 server renegotiates after the connection is established and presents a different, CA-trusted certificate whose hostname does not match the requested host. Node.js re-runs hostname verification on the renegotiated handshake and destroys the socket with ERR_TLS_CERT_ALTNAME_INVALID. undici's established socket error handler asserted that this error code could never occur, so the peer-controlled error became an uncaught AssertionError that terminates the Node.js process. Both the HTTP/1.1 and HTTP/2 paths are affected.
A malicious or compromised HTTPS endpoint reached through undici or the global fetch() can crash the client with a single server-initiated renegotiation, taking down all in-flight requests and background work in the process. Only TLS 1.2 is affected, because TLS 1.3 does not support renegotiation. Exploitation does not require a CA compromise: the attacker controls the endpoint and can present two ordinary valid certificates, the first matching the requested URL and the second intentionally not matching it.
Patches
Upgrade to undici 6.29.1, 7.30.1, or 8.12.2.
Workarounds
Restrict outbound connections to TLS 1.3, for example by setting connect: { minVersion: 'TLSv1.3', maxVersion: 'TLSv1.3' } on the client or agent, so that renegotiation cannot occur, when the target endpoints support TLS 1.3.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » undicivia npm undici | >= 4.2.1, < 6.29.1>= 7.0.0, < 7.30.1>= 8.0.0, < 8.12.2 | 6.29.1, 7.30.1, 8.12.2 |
| org.webjars.npm » undicivia npm undici | >= 4.2.1, < 6.29.1>= 7.0.0, < 7.30.1>= 8.0.0, < 8.12.2 | 6.29.1, 7.30.1, 8.12.2 |
Blast radius
8% of the dependent artifacts (2) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 61 |
| 2 hops | 80 |
| 3 hops | 69 |
Most used dependents
- org.mvnpm.at.scalar » workspace-store8 usages
- org.mvnpm.at.scalar » openapi-parser7 usages
- org.mvnpm.at.scalar » json-magic7 usages
- org.mvnpm.at.scalar » oas-utils5 usages
- org.webjars.npm » firebase3 usages
- org.mvnpm » miniflare2 usages
- org.mvnpm.at.scalar » api-client2 usages
- org.mvnpm.at.scalar » blocks2 usages
- org.mvnpm.at.scalar » sidebar2 usages
- org.mvnpm.at.scalar » openapi-to-markdown2 usages
- org.webjars.npm » firebase__auth2 usages
- org.webjars.npm » firebase__firestore2 usages
- org.webjars.npm » firebase__functions2 usages
- org.webjars.npm » firebase__storage2 usages
- org.mvnpm » wrangler1 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-87018 | nvd.nist.gov |
| Package | nodejs/undici | github.com |
| Web | nodejs/undici advisory GHSA-qrxm-fqhp-jwvm | github.com |
| Web | nodejs/undici commit 12cfd96 | github.com |
| Web | nodejs/undici commit b40fbfc | github.com |
| Web | nodejs/undici commit e257e9f | github.com |
| Web | security-advisories.html | cna.openjsf.org |
| Web | nodejs/undici release v6.29.1 | github.com |
| Web | nodejs/undici release v7.30.1 | github.com |
| Web | nodejs/undici release v8.12.2 | github.com |
