All vulnerabilities

npm

CVE-2026-119187

Forge: Denial of service in TLS record processing via call stack exhaustion

Severity
High 7.5
Published
30 Oct 2026
Last changed
30 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.4.1
Exploit chance
0.4% in the next 30 daysHigher than 36% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled recursion (CWE-674)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-hqq3-7jhf-c5jx
Sources
OSV.dev and GitHub

Description

Connections created with forge.tls.createConnection() processed received TLS records recursively, one stack level per record. A peer can send one chunk of thousands of small records, such as heartbeat records, which are accepted before the handshake, and process() throws RangeError: Maximum call stack size exceeded, which terminates Node.js processes that use the documented socket wiring. Fixed in node-forge 1.4.1.

In lib/tls.js, c.process() reads one record and passes it to _update(), which calls the handler for the record type from ctTable. Every handler (tls.handleHeartbeat, tls.handleApplicationData, tls.handleHandshake for fragmented messages, tls.handleHelloRequest and the other handshake handlers) ends by calling c.process() again to continue with the next buffered record, or the next message in the same record. Each record therefore adds process → _update → handler to the call stack.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

Wrap every call to connection.process() in try/catch, and on an exception close the connection (connection.close()) and destroy the underlying socket. This prevents the process crash but not the loss of the attacked connection.

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.1

About node-forge

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

References