From 52a8ace880dbd92a96f2e15255a63e383dc28ca8 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Tue, 23 Jun 2026 12:47:47 +0200 Subject: [PATCH] https: bind identity checks to session reuse PR-URL: https://github.com/nodejs-private/node-private/pull/904 Refs: https://hackerone.com/reports/3811980 CVE-ID: CVE-2026-58040 --- doc/api/https.md | 4 + lib/https.js | 44 ++++++- ...t-https-agent-checkserveridentity-reuse.js | 113 ++++++++++++++++++ 3 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-https-agent-checkserveridentity-reuse.js diff --git a/doc/api/https.md b/doc/api/https.md index 634bba15d60..cdd8aad956e 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -100,6 +100,10 @@ changes: See [`Session Resumption`][] for information about TLS session reuse. +Requests that specify a custom `checkServerIdentity` option are not eligible +for connection reuse or TLS session reuse by an `https.Agent`, unless the +`checkServerIdentity` option was specified when constructing the Agent. + #### Event: `'keylog'`