Improper Certificate Validation Affecting node-forge package, versions <1.4.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.25% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-NODEFORGE-22113978
  • published1 Nov 2026
  • disclosed26 Oct 2026
  • creditnickcollisson-workos

Introduced: 26 Oct 2026

NewCVE-2026-119190  (opens in a new tab)
CWE-295  (opens in a new tab)
CWE-706  (opens in a new tab)

How to fix?

Upgrade node-forge to version 1.4.1 or higher.

Overview

node-forge is a JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.

Affected versions of this package are vulnerable to Improper Certificate Validation in the pki.verifyCertificateChain function in lib/x509.js. An attacker can get a non-CA certificate accepted as a CA, and then impersonate any server or client the verifier trusts, by placing a second basicConstraints extension under the deprecated OIDs 2.5.29.10 or 2.5.29.13 with cA set TRUE, because lib/oids.js maps those OIDs to the same name and cert.getExtension() returns the first name match, so chain verification reads the forged extension in place of the genuine 2.5.29.19 one. This requires a CA that the application trusts to issue a certificate carrying the attacker-supplied deprecated-OID extension, as when a CA copies extensions from certificate requests through an OpenSSL copy_extensions workflow, and node-forge still rejects the chain if that issuer adds a keyUsage extension without keyCertSign.

Workaround

This vulnerability can be avoided with an options.verify callback that rejects any non-leaf certificate lacking a 2.5.29.19 basicConstraints extension with cA TRUE, and, on the issuance side, by configuring trusted CAs not to copy unrecognized extensions from certificate requests.

Note: This is a bypass of the fix for the vulnerability described in CVE-2026-33896.

CVSS Base Scores

version 4.0
version 3.1