npm
CVE-2026-119189
Forge: X.509 pathLenConstraint not enforced by verifyCertificateChain() for CA certificates without keyUsage
- Severity
- Medium 5.9
- Published
- 10 Nov 2026
- Last changed
- 10 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.4.1
- Exploit chance
- 0.2% in the next 30 daysHigher than 6% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N- Also known as
- GHSA-h46v-rmh6-fq4f
- Sources
- OSV.dev and GitHub
Description
forge.pki.verifyCertificateChain() enforces the pathLenConstraint of a CA certificate's basicConstraints extension only when that certificate also has a keyUsage extension. For a CA certificate with a pathLenConstraint and no keyUsage, chains with more intermediate CA certificates below it than the constraint allows are accepted. Fixed in node-forge 1.4.1.
In pki.verifyCertificateChain() (lib/x509.js), the path length check for a CA certificate was guarded by keyUsageExt !== null && 'pathLenConstraint' in bcExt. The keyUsage test was originally a proxy for "a basicConstraints extension exists". Since node-forge 1.4.0 (GHSA-2328-f5f3-gj25), basicConstraints is required for every certificate that reaches this check, so the only remaining effect of the guard is to skip pathLenConstraint enforcement for CA certificates without keyUsage.
Workarounds
None in node-forge itself. Applications that pass an options.verify callback to pki.verifyCertificateChain() (or verify to forge.tls.createConnection()) can reject chains in which a CA certificate at depth d has basicConstraints.pathLenConstraint < d - 1. Re-issuing constrained CA certificates with a keyUsage extension that includes keyCertSign also restores enforcement.
Affected software
| Software | Affected versions |
|---|---|
node-forgenpm · osv:npm:node-forge |
|
About node-forge
- Weekly downloads (npm)
- 55,543,907npm, 23 Nov 2026
Vulnerabilities in node-forge
- In our list
- 20
- Published in the last 12 months
- 20
- Critical, last 12 months
- 0
- High, last 12 months
- 7
- Known exploited
- 0
- CVE-2026-125335Forge: Ed25519 signature verification accepts small-order public keysLow 3.7 10 Nov 2026
- CVE-2026-125332Forge: TLS client crash on an unsupported ServerHello compression methodMedium 5.9 10 Nov 2026
- CVE-2026-125333Forge: ReDoS in forge.http response header and cookie trimmingMedium 5.9 10 Nov 2026
- CVE-2026-125334Forge: TLS client crash on a handshake record received without a sessionMedium 5.9 10 Nov 2026
- CVE-2026-118774Forge: Certificate signature verified with the issuer's RSA signature schemeLow 3.7 10 Nov 2026
- CVE-2026-118776Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryptionLow 3.7 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-119189
- GitHub Advisory Database https://github.com/advisories/GHSA-h46v-rmh6-fq4f