CVE-2026-118780 in Forge
Summary
by MITRE • 10/29/2026
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the affected implementation used pki.verifyCertificateChain(), pki.createCaStore(), duplicate subject names to process the relevant input or security decision. node-forge modified the CA store while trying certificates that shared a subject name during pki.verifyCertificateChain(). A failed chain verification could permanently remove trusted CA certificates from the store, causing later valid chains to fail and creating a persistent availability impact for applications that reused the store. This issue is fixed in version 1.4.1.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 10/29/2026
The vulnerability identified in node-forge, also known as Forge, represents a critical flaw within its native JavaScript implementation of Transport Layer Security protocols. Specifically affecting versions prior to 1.4.1, this defect resides in the certificate chain verification logic managed by the pki.verifyCertificateChain function and associated utilities like pki.createCaStore. The core technical issue stems from improper handling of Certificate Authority stores when processing certificates that share identical subject names. During the validation process, the library modifies the CA store state directly while attempting to verify individual certificates within a chain. This mutable state management creates a race condition-like scenario where the integrity of the trust anchor database is compromised based on the order and outcome of certificate evaluations rather than static cryptographic properties.
The operational impact of this flaw is severe due to its persistent nature, classifying it as an availability vulnerability that can lead to denial-of-service conditions for applications relying on secure communications. When a chain verification fails—whether due to invalid signatures, expired certificates, or other validation errors—the flawed logic permanently removes trusted CA certificates from the in-memory store if those certificates share subject names with any certificate encountered during the failed attempt. Consequently, subsequent attempts to verify valid and legitimate certificate chains may fail because the necessary root or intermediate trust anchors have been erroneously purged from memory. This results in a cascading failure where secure connections are dropped not due to actual cryptographic issues but due to corrupted internal state, effectively breaking TLS connectivity for services that reuse the CA store instance across multiple requests.
From a classification perspective, this vulnerability aligns with CWE-401, which describes missing release of memory or other resources after they have been used, although in this context it manifests as improper resource management leading to data corruption rather than simple memory leaks. It also relates to CWE-253 regarding incorrect check of function return value, where the library fails to properly isolate side effects during verification operations. In terms of adversary behavior and defensive mapping, this flaw impacts the availability component of security integrity and can be associated with ATT&CK technique T1499, Endpoint Denial of Service, specifically through resource exhaustion or state corruption that disrupts normal operational continuity. The persistent removal of trust anchors means that even after the initial triggering event is resolved, the application remains in a degraded state until the store is reinitialized, requiring either an application restart or explicit cache clearing to restore functionality.
Mitigation strategies primarily involve upgrading node-forge to version 1.4.1 or later, where this logic has been corrected to ensure that CA stores are not mutated during verification processes unless explicitly intended by design. For applications unable to upgrade immediately, implementing a fresh instantiation of the CA store for each independent TLS handshake can prevent cross-contamination between different connection contexts. Additionally, developers should avoid reusing mutable certificate validation objects across multiple unrelated connections without resetting their internal state. Ensuring that trust anchor stores are treated as immutable during verification or copied before modification is essential to maintaining the reliability of TLS implementations in JavaScript environments where such libraries are commonly deployed for server-side and client-side security operations.