Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. undici
  4. ›
  5. CVE-2026-87018

CVE-2026-87018: undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation

October 27, 2026

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.

References

  • cna.openjsf.org/security-advisories.html
  • github.com/advisories/GHSA-qrxm-fqhp-jwvm
  • github.com/nodejs/undici/commit/12cfd96c3f430897656e3edc1c5e02be8c1cd309
  • github.com/nodejs/undici/commit/b40fbfc0651703cf9fa9f6ced68b679f28d8bb28
  • github.com/nodejs/undici/commit/e257e9f8fb42eedd50727b9cf65e548c8925e4a8
  • github.com/nodejs/undici/releases/tag/v6.29.1
  • github.com/nodejs/undici/releases/tag/v7.30.1
  • github.com/nodejs/undici/releases/tag/v8.12.2
  • github.com/nodejs/undici/security/advisories/GHSA-qrxm-fqhp-jwvm
  • nvd.nist.gov/vuln/detail/CVE-2026-87018

Code Behaviors & Features

Detect and mitigate CVE-2026-87018 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 4.2.1 before 6.29.1, all versions starting from 7.0.0 before 7.30.1, all versions starting from 8.0.0 before 8.12.2

Fixed versions

  • 6.29.1
  • 7.30.1
  • 8.12.2

Solution

Upgrade to versions 6.29.1, 7.30.1, 8.12.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-248: Uncaught Exception
  • CWE-617: Reachable Assertion

Source file

npm/undici/CVE-2026-87018.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 28 Oct 2026 00:16:01 +0000.