All vulnerabilities

npm

CVE-2026-125334

Forge: TLS client crash on a handshake record received without a session

Severity
Medium 5.9
Published
10 Nov 2026
Last changed
10 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.4.3
Exploit chance
0.3% in the next 30 daysHigher than 27% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Null pointer dereference (CWE-476)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-j8rw-jp99-435v
Sources
OSV.dev and GitHub

Description

A forge.tls client throws an uncaught TypeError from connection.process() when it receives a ServerHello while it has no session: after a close_notify alert or a call to close(), or before handshake() is called. A malicious server or an on-path attacker can use this to terminate a Node.js process. Fixed in node-forge 1.4.3.

tls.handleHandshake() in lib/tls.js updates the handshake digests with c.session.md5.update(bytes) before it calls the message handler. A client creates its session in handshake(), and c.reset() sets it to null when the connection is closed. Closing doesn't set the fail flag, and the client goes back to expecting a ServerHello, so a Handshake record received afterwards still reaches handleHandshake(), which throws TypeError: Cannot read properties of null (reading 'md5').

This happens:

  • after the server sends a close_notify alert (at any alert level);
  • after the application calls close();
  • before the application calls handshake().
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

Catch exceptions thrown by connection.process() and close the socket, or stop passing socket data to process() once the closed callback has been called and until handshake() is called again.

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

Affected software

SoftwareAffected versions
node-forgenpm · osv:npm:node-forge
  • Every version before 1.4.3

About node-forge

Weekly downloads (npm)
55,543,907npm, 23 Nov 2026

References