{"id":"GHSA-qrxm-fqhp-jwvm","revision":"8acb19149daf4c779cc2d031c32923a6","records":[{"revision":"8acb19149daf4c779cc2d031c32923a6","observedAt":"2026-10-27T19:46:12.986+00:00","statement":{"source":"osv","id":"GHSA-qrxm-fqhp-jwvm","aliases":["CVE-2026-87018"],"title":"undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation","description":"## Impact\n\nundici 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.\n\nA 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.\n\n## Patches\n\nUpgrade to undici 6.29.1, 7.30.1, or 8.12.2.\n\n## Workarounds\n\nRestrict 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.","state":0,"publishedAt":"2026-10-27T19:02:21+00:00","modifiedAt":"2026-10-27T19:15:22.4035736+00:00","affected":[{"ecosystem":"npm","name":"undici","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.2.1"},{"kind":"fixed","version":"6.29.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"undici","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"7.0.0"},{"kind":"fixed","version":"7.30.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"undici","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"8.0.0"},{"kind":"fixed","version":"8.12.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/nodejs/undici/security/advisories/GHSA-qrxm-fqhp-jwvm","https://nvd.nist.gov/vuln/detail/CVE-2026-87018","https://github.com/nodejs/undici/commit/12cfd96c3f430897656e3edc1c5e02be8c1cd309","https://github.com/nodejs/undici/commit/b40fbfc0651703cf9fa9f6ced68b679f28d8bb28","https://github.com/nodejs/undici/commit/e257e9f8fb42eedd50727b9cf65e548c8925e4a8","https://cna.openjsf.org/security-advisories.html","https://github.com/nodejs/undici","https://github.com/nodejs/undici/releases/tag/v6.29.1","https://github.com/nodejs/undici/releases/tag/v7.30.1","https://github.com/nodejs/undici/releases/tag/v8.12.2"],"sourceUrl":"https://github.com/advisories/GHSA-qrxm-fqhp-jwvm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-qrxm-fqhp-jwvm","identifiers":["GHSA-qrxm-fqhp-jwvm","CVE-2026-87018"]},"retained":false,"historicalAffected":[]}],"coverage":[]}