All vulnerabilities

npm

CVE-2026-118778

Forge: TLS client crash when the server sends no certificate

Severity
Medium 5.9
Published
30 Oct 2026
Last changed
30 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.4.1
Exploit chance
0.2% in the next 30 daysHigher than 11% 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-525v-9gp9-w22h
Sources
OSV.dev and GitHub

Description

The forge TLS client's check for a missing server certificate read the wrong property and never ran. A malicious TLS server, or an on-path attacker who removes the server's Certificate message, can make connection.process() throw a TypeError, which crashes applications that use the forge TLS client. Fixed in node-forge 1.4.1.

After ServerHelloDone, tls.handleServerHelloDone() in lib/tls.js is meant to reject a server that sent no certificate with a fatal insufficient_security alert, after consulting the application's verify callback. The check tested c.serverCertificate, which is never set (the certificate is stored as c.session.serverCertificate), so it never ran. The client state machine allows ServerHelloDone directly after ServerHello, so the handshake continued to tls.createClientKeyExchange(), which reads c.session.serverCertificate.publicKey and throws a TypeError on the null certificate.

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

Workarounds

Catch exceptions thrown by connection.process() in the code that feeds it network data, and close the connection when one occurs.

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