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


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.17% (6th 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-22114202
  • published1 Nov 2026
  • disclosed26 Oct 2026
  • creditoffset, eddieran, Zion Boggan

Introduced: 26 Oct 2026

NewCVE-2026-119189  (opens in a new tab)
CWE-295  (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 who controls a CA certificate that carries a pathLenConstraint but no keyUsage extension can place more intermediate CAs below it than the constraint permits and have the chain accepted, because the path-length check is guarded by keyUsageExt !== null && 'pathLenConstraint' in bcExt and is skipped whenever keyUsage is absent. This requires a trusted chain that contains such a constrained CA without keyUsage, which mainly arises in private PKIs since public web PKI CAs include keyUsage, and the attacker must hold that CA's key or obtain a CA certificate from it to issue the extra subordinates.

Workaround

This vulnerability can be avoided with an options.verify callback that rejects any chain where a CA at depth d has a pathLenConstraint less than d minus 1, or, on the issuance side, by re-issuing constrained CA certificates with a keyUsage extension that includes keyCertSign, which restores enforcement.

CVSS Base Scores

version 4.0
version 3.1