High

node-forge has an Interpretation Conflict vulnerability via its ASN.1 Validator Desynchronization

  • Disclosed: 26.11.2025
  • Updated: 11.10.2026 10:22

Summary

CVE-2025-12816 has been reserved by CERT/CC

Description An Interpretation Conflict (CWE-436) vulnerability in node-forge versions 1.3.1 and below enables remote, unauthenticated attackers to craft ASN.1 structures to desynchronize schema validations, yielding a semantic divergence that may bypass downstream cryptographic verifications and security decisions.

Details

A critical ASN.1 validation bypass vulnerability exists in the node-forge asn1.validate function within forge/lib/asn1.js. ASN.1 is a schema language that defines data structures, like the typed record schemas used in X.509, PKCS#7, PKCS#12, etc. DER (Distinguished Encoding Rules), a strict binary encoding of ASN.1, is what cryptographic code expects when verifying signatures, and the exact bytes and structure must match the schema used to compute and verify the signature. After deserializing DER, Forge uses static ASN.1 validation schemas to locate the signed data or public key, compute digests over the exact bytes required, and feed digest and signature fields into cryptographic primitives.

This vulnerability allows a specially crafted ASN.1 object to desynchronize the validator on optional boundaries, causing a malformed optional field to be semantically reinterpreted as the subsequent mandatory structure. This manifests as logic bypasses in cryptographic algorithms and protocols with optional security features (such as PKCS#12, where MACs are treated as absent) and semantic interpretation conflicts in strict protocols (such as X.509, where fields are read as the wrong type).

Impact

This flaw allows an attacker to desynchronize the validator, allowing critical components like digital signatures or integrity checks to be skipped or validated against attacker-controlled data.

This vulnerability impacts the ans1.validate function in node-forge before patched version 1.3.2. https://github.com/digitalbazaar/forge/blob/main/lib/asn1.js.

The following components in node-forge are impacted. lib/asn1.js lib/x509.js lib/pkcs12.js lib/pkcs7.js lib/rsa.js lib/pbe.js lib/ed25519.js

Any downstream application using these components is impacted.

These components may be leveraged by downstream applications in ways that enable full compromise of integrity, leading to potential availability and confidentiality compromises.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package node-forge < 1.3.2 1.3.2

References

CVSS score 8.6/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Weakness (CWE)
CWE-436
Platform
npm
Package
node-forge
Disclosed
26.11.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-5gfm-wpxj-wjgq - CC BY 4.0

Vulnerability history: node-forge

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (15) in the archive
Total entries
15
First → latest
09.2020 03.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 9
  • Medium 3
  • Low 3

Disclosures per year

  1. 2020: 1
  2. 2021: 0
  3. 2022: 7
  4. 2023: 0
  5. 2024: 0
  6. 2025: 3
  7. 2026: 4
Severity:
  1. High · 7.5 CVE-2026-33894 < 1.4.0 1.4.0
  2. High CVE-2025-66031 < 1.3.2 1.3.2
  3. node-forge has an Interpretation Conflict vulnerability via its ASN.1 Validator Desynchronization this entry
    High · 8.6 CVE-2025-12816 < 1.3.2 1.3.2
  4. High · 7.5 CVE-2022-24772 < 1.3.0 1.3.0
  5. High · 7.5 CVE-2022-24771 < 1.3.0 1.3.0
  6. High · 9.8 CVE-2020-7720 < 0.10.0 0.10.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.