NULL Pointer Dereference Affecting node-forge package, versions <1.4.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.28% (21st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-NODEFORGE-22409010
  • published11 Nov 2026
  • disclosed10 Nov 2026
  • creditmanus-use

Introduced: 10 Nov 2026

NewCVE-2026-125334  (opens in a new tab)
CWE-476  (opens in a new tab)

How to fix?

Upgrade node-forge to version 1.4.3 or higher.

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to NULL Pointer Dereference via tls.handleHandshake() in lib/tls.js, which attempts to update handshake digests via c.session.md5.update(bytes) when c.session is null. A client's session is set to null by c.reset() after a close_notify alert or a call to close(), and is also absent before handshake() is called. A malicious server or an on-path attacker can send a ServerHello record in any of these states, causing an uncaught TypeError to propagate out of connection.process() and terminate the Node.js process.

Note: Only forge.tls clients are affected; servers are not vulnerable because a server creates its session upon receiving a ClientHello.

PoC

var c = forge.tls.createConnection({server: false, ...});
    c.handshake();
    // warning close_notify alert, then an empty ServerHello, in separate
    // process() calls
    c.process(forge.util.hexToBytes('15030100020100'));
    c.process(forge.util.hexToBytes('160301000402000000'));
    // <= 1.4.2: TypeError: Cannot read properties of null (reading 'md5')
    // 1.4.3: the record is ignored

The reporter's PoC is in tests/pocs/ghsa-j8rw-jp99-435v.js, and regression tests are in tests/unit/tls.js.

CVSS Base Scores

version 4.0
version 3.1