MEDIUMCVSS v3.1 5.9Vulnerability

CVE-2026-125334

### Summary 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. ### Details `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()`. The exception propagates out of `connection.process()`. Applications that pass socket data to `process()` from a `data` event handler without catching exceptions, as in the README example, terminate. After a reset the connection uses no encryption, so an on-path attacker can inject the records even when the real server is honest. Servers are not affected: a server creates its session when it receives a ClientHello. The fix handles these records like other unexpected records on a closed client: they are ignored. #### Patches Fixed in node-forge 1.4.3. #### 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. #### Resources - RFC 5246, section 7.2.1 (Closure Alerts): https://www.rfc-editor.org/rfc/rfc5246#section-7.2.1 - Related: GHSA-525v-9gp9-w22h (another TLS client `TypeError`, fixed in 1.4.1):

Properties

Summary
Forge: TLS client crash on a handshake record received without a session
Severity
medium
Nvd fetched at
2026-11-10T23:33:48.924589+00:00
Cvss score
5.9
Cvss severity
MEDIUM
Retrieved at
2026-11-10T23:34:27+00:00
Ghsa published
2026-11-10T21:14:26Z
Source url
https://github.com/advisories/GHSA-j8rw-jp99-435v
Ghsa updated
2026-11-10T21:14:26Z
Ghsa id
GHSA-j8rw-jp99-435v
Last source
GitHub Advisory Database
Score
5.9
Cvss version
3.1
Cve id
CVE-2026-125334
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
First seen by Signal
2026-11-10T19:28:56+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Published at
2026-11-10T19:21:11.090
Last modified
2026-11-10T21:46:34.010

Related Entities (3)

AFFECTS (1)

→[Software]npm/node-forge

HAS_WEAKNESS (1)

VULNERABLE_TO (1)

←[Software]npm/node-forge

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-125334 (CVSS v3.1 5.9) — Ninja Signal Threat Intelligence | Ninja Signal