CVE-2026-21637: Incomplete fix for CVE-2026-21637: loadSNI() in _tls_wrap.js lacks try/catch leading to Remote DoS
A flaw in Node.js TLS error handling allows remote attackers to crash or exhaust resources of a TLS server when pskCallback or ALPNCallback are in use. Synchronous exceptions thrown during these callbacks bypass standard TLS error handling paths (tlsClientError and error), causing either immediate process termination or silent file descriptor leaks that eventually lead to denial of service. Because these callbacks process attacker-controlled input during the TLS handshake, a remote client can repeatedly trigger the issue. This vulnerability affects TLS servers using PSK or ALPN callbacks across Node.js versions where these callbacks throw without being safely wrapped.
Other sources
A flaw in Node.js TLS error handling leaves SNICallback invocations unprotected against synchronous exceptions, while the equivalent ALPN and PSK callbacks were already addressed in CVE-2026-21637. This represents an incomplete fix of that prior vulnerability.
When an SNICallback throws synchronously on unexpected input the exception bypasses TLS error handlers and propagates as an uncaught exception, crashing the Node.js process.
This vulnerability affects all Node.js versions that received the CVE-2026-21637 fix, including 20.x, 22.x, 24.x, and 25.x, on any TLS server where SNICallback may throw on unexpected servername input.
— Node.Js
A flaw in Node.js TLS error handling leaves SNICallback invocations unprotected against synchronous exceptions, while the equivalent ALPN and PSK callbacks were already addressed in CVE-2026-21637. This represents an incomplete fix of that prior vulnerability.
When an SNICallback throws synchronously on unexpected input the exception bypasses TLS error handlers and propagates as an uncaught exception, crashing the Node.js process.
— Node.Js
CVE-2026-21637 is regarding a vulnerability in Node.js TLS error handling allows remote attackers to crash or exhaust resources of a TLS server when pskCallback or ALPNCallback are in use. Synchronous exceptions thrown during these callbacks bypass standard TLS error handling paths (tlsClientError and error), causing either immediate process termination or silent file descriptor leaks that eventually lead to denial of service. Because these callbacks process attacker-controlled input during the TLS handshake, a remote client can repeatedly trigger the issue. HackerOne created this CVE on their behalf. The documented Visual Studio updates incorporate updates in Node.js which address this vulnerability. Please see CVE-2026-21637 for more information.
— Microsoft
HackerOne: CVE-2026-21637 TLS PSK/ALPN Callback Exceptions Bypass Error Handlers
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 20.20.2Fixed in 22.22.2Fixed in 24.14.1Fixed in 25.8.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 20.20.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 20.20.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 22.22.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 22.22.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 24.13.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 24.14.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 25.3.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 25.8.2
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2026-21637?
CVE-2026-21637 is considered a high severity vulnerability due to its potential to crash or exhaust resources of a TLS server.
How do I fix CVE-2026-21637?
To fix CVE-2026-21637, upgrade your Node.js version to the latest release that addresses this vulnerability.
What are the attack vectors for CVE-2026-21637?
Remote attackers can exploit CVE-2026-21637 through callbacks like `pskCallback` or `ALPNCallback` during TLS operations.
Which versions of Node.js are affected by CVE-2026-21637?
CVE-2026-21637 affects specific versions of Node.js, particularly those that utilize the faulty TLS error handling mechanisms during the specified callbacks.
What kind of impact does CVE-2026-21637 have on a TLS server?
CVE-2026-21637 can lead to denial of service by crashing the server or exhausting its resources due to unhandled exceptions.