REDHAT-BUG-2570013: Medium severity npm/node-forge vulnerability
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.3, a forge.tls client can pass a handshake record to tls.handleHandshake() while the connection has no session, including after a closenotify alert, after the application calls close(), or before handshake() is called. The handler dereferences c.session.md5 before dispatching the message, causing a TypeError to propagate from connection.process(). A malicious server or on-path attacker can deliver the record, including after a reset when the connection uses no encryption, and terminate a Node.js process if the application does not catch the exception. forge.tls servers are not affected, and there is no confidentiality or integrity impact. This issue is fixed in version 1.4.3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.4.3
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Only applications using forge.tls as a client are affected. forge.tls servers are not affected.
What must an attacker be able to do to trigger the failure?
A malicious server or an on-path attacker must deliver a handshake record while the client connection has no session. This can occur after a close_notify alert, after the application calls close(), before handshake() is called, or after a reset when the connection uses no encryption.
What is the practical impact?
The malformed state causes a TypeError to propagate from connection.process(). If the application does not catch that exception, the attacker can terminate the Node.js process; no confidentiality or integrity impact is described.
How can this be remediated?
Upgrade node-forge to version 1.4.3 or later. If upgrading is not immediately possible, ensure exceptions from connection.process() are caught so an uncaught TypeError cannot terminate the process.