All vulnerabilities

npm

CVE-2026-87018

undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation

Severity
High 7.5
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
6.29.1, 7.30.1, 8.12.2
Exploit chance
0.2% in the next 30 daysHigher than 14% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncaught exception (CWE-248)CWE-617
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-qrxm-fqhp-jwvm
Sources
OSV.dev and GitHub

Description

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

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.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
undicinpm · osv:npm:undici
  • From 4.2.1 before 6.29.1
  • From 7.0.0 before 7.30.1
  • From 8.0.0 before 8.12.2

About undici

Weekly downloads (npm)
355,862,465npm, 22 Nov 2026

References