/

CVE-2026-119190

Severity:

HIGH RISK

(7.4)

Certificate Validation Confusion (CWE-295) in node-forge

CVE-2026-119190

Undergoing Analysis

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295, CWE-436

Impact:

Certificate Authority Impersonation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A certificate validation flaw in node-forge could cause deprecated certificate extension identifiers to be interpreted as the modern basicConstraints extension. If a trusted certificate authority copies attacker-controlled extensions into issued certificates, an attacker may make a non-CA certificate appear authorized to issue certificates and impersonate servers or clients.

A certificate validation flaw in node-forge could cause deprecated certificate extension identifiers to be interpreted as the modern basicConstraints extension. If a trusted certificate authority copies attacker-controlled extensions into issued certificates, an attacker may make a non-CA certificate appear authorized to issue certificates and impersonate servers or clients.

Affected context

The issue affects applications using vulnerable node-forge releases to validate certificate chains. Risk is present when a trusted issuing CA permits certificate request extensions to influence issued certificates, and when a certificate contains a permissive deprecated extension before the genuine basicConstraints extension. A keyUsage extension that omits keyCertSign may prevent the described chain from being accepted.

The issue affects applications using vulnerable node-forge releases to validate certificate chains. Risk is present when a trusted issuing CA permits certificate request extensions to influence issued certificates, and when a certificate contains a permissive deprecated extension before the genuine basicConstraints extension. A keyUsage extension that omits keyCertSign may prevent the described chain from being accepted.

Exploit preconditions

  • Attack surface: Certificate-chain validation in applications using node-forge
  • Required access: The ability to obtain a certificate from a CA trusted by the target application
  • Trigger point: Processing certificate extensions during pki.verifyCertificateChain()
  • Why exploitation is possible: Deprecated extension OIDs can be treated as equivalent to basicConstraints, and the first matching interpreted extension may determine whether the certificate is considered a CA
  • Attack surface: Certificate-chain validation in applications using node-forge
  • Required access: The ability to obtain a certificate from a CA trusted by the target application
  • Trigger point: Processing certificate extensions during pki.verifyCertificateChain()
  • Why exploitation is possible: Deprecated extension OIDs can be treated as equivalent to basicConstraints, and the first matching interpreted extension may determine whether the certificate is considered a CA

Why this happens

The underlying bug is inconsistent interpretation of certificate extensions during validation. node-forge treated deprecated extension identifiers as aliases for basicConstraints and selected the first extension with the interpreted name, allowing attacker-influenced extension ordering to override the intended CA constraints. This maps primarily to CWE-295: Improper Certificate Validation and is also related to CWE-436: Interpretation Conflict, because different extension identifiers were assigned the same security-relevant meaning.

The underlying bug is inconsistent interpretation of certificate extensions during validation. node-forge treated deprecated extension identifiers as aliases for basicConstraints and selected the first extension with the interpreted name, allowing attacker-influenced extension ordering to override the intended CA constraints. This maps primarily to CWE-295: Improper Certificate Validation and is also related to CWE-436: Interpretation Conflict, because different extension identifiers were assigned the same security-relevant meaning.

Potential impact

  • An attacker may obtain acceptance of a certificate as a certificate authority
  • The attacker could issue certificates for arbitrary hostnames or identities
  • Applications may accept impersonating server certificates
  • Mutual TLS deployments could accept unauthorized client certificates
  • Trust relationships relying on certificate-chain validation may be undermined
  • An attacker may obtain acceptance of a certificate as a certificate authority
  • The attacker could issue certificates for arbitrary hostnames or identities
  • Applications may accept impersonating server certificates
  • Mutual TLS deployments could accept unauthorized client certificates
  • Trust relationships relying on certificate-chain validation may be undermined

General mitigation guidance

Mitigation generally focuses on strict, standards-compliant certificate parsing and unambiguous constraint evaluation.

Common defensive patterns include:

  • Rejecting deprecated or unknown extension identifiers when they overlap with security-sensitive semantics
  • Evaluating only the standards-defined basicConstraints extension for CA authorization
  • Applying deterministic duplicate-extension handling and rejecting conflicting representations
  • Treating certificate-request extensions as untrusted and allowing only explicitly approved extensions to be copied
  • Requiring appropriate keyUsage and basicConstraints combinations for certificate issuance
  • Limiting trusted CA scope and applying least privilege to issuing authorities
  • Using independent certificate-validation controls where high-assurance identity verification is required

Mitigation generally focuses on strict, standards-compliant certificate parsing and unambiguous constraint evaluation.

Common defensive patterns include:

  • Rejecting deprecated or unknown extension identifiers when they overlap with security-sensitive semantics
  • Evaluating only the standards-defined basicConstraints extension for CA authorization
  • Applying deterministic duplicate-extension handling and rejecting conflicting representations
  • Treating certificate-request extensions as untrusted and allowing only explicitly approved extensions to be copied
  • Requiring appropriate keyUsage and basicConstraints combinations for certificate issuance
  • Limiting trusted CA scope and applying least privilege to issuing authorities
  • Using independent certificate-validation controls where high-assurance identity verification is required

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis and dependency review for certificate parsers that alias deprecated OIDs to active security properties
  • Code review checks for "first matching extension" logic and permissive duplicate-extension handling
  • Tests using certificates with conflicting, duplicated, reordered, deprecated, and unknown extensions
  • CA policy checks that detect unauthorized extension copying from certificate signing requests
  • Runtime monitoring for unexpected certificate issuances, unusual subject names, or newly observed issuer relationships
  • Automated software composition and security review tools that flag vulnerable certificate-validation dependencies

Organizations can look for this weakness through:

  • Static analysis and dependency review for certificate parsers that alias deprecated OIDs to active security properties
  • Code review checks for "first matching extension" logic and permissive duplicate-extension handling
  • Tests using certificates with conflicting, duplicated, reordered, deprecated, and unknown extensions
  • CA policy checks that detect unauthorized extension copying from certificate signing requests
  • Runtime monitoring for unexpected certificate issuances, unusual subject names, or newly observed issuer relationships
  • Automated software composition and security review tools that flag vulnerable certificate-validation dependencies

Sources

SourceLink
github.comgithub.com/digitalbazaar/forge/commit/58c06bc251856b409c30ecb35a93f5f6c9bbc84a
github.comgithub.com/digitalbazaar/forge/releases/tag/v1.4.1
github.comgithub.com/digitalbazaar/forge/security/advisories/GHSA-5x38-2vff-x55p

Frequently asked

questions

Generally, no. Exploitation requires obtaining a certificate from a CA trusted by the target application and influencing the extensions included in that certificate.

Direct access is not necessarily required. The attacker needs a certificate that triggers the parser's ambiguous extension handling and must present it where the application performs certificate-chain validation.

Use a certificate-validation implementation that rejects deprecated or conflicting extension representations and evaluates CA authorization only from the standards-defined basicConstraints and keyUsage semantics.

Enforce strict CA issuance policies, avoid uncontrolled copying of request extensions, test certificate parsers with adversarial extension ordering, and monitor certificate issuance and trust changes.

Generally, no. Exploitation requires obtaining a certificate from a CA trusted by the target application and influencing the extensions included in that certificate.

Direct access is not necessarily required. The attacker needs a certificate that triggers the parser's ambiguous extension handling and must present it where the application performs certificate-chain validation.

Use a certificate-validation implementation that rejects deprecated or conflicting extension representations and evaluates CA authorization only from the standards-defined basicConstraints and keyUsage semantics.

Enforce strict CA issuance policies, avoid uncontrolled copying of request extensions, test certificate parsers with adversarial extension ordering, and monitor certificate issuance and trust changes.

Find out what's already
exploitable in your codebase.