CVE-2025-12816
ADVISORY - githubSummary
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.
Common Weakness Enumeration (CWE)
Interpretation Conflict
Interpretation Conflict
GitHub
3.9
CVSS SCORE
8.7high| Package | Type | OS Name | OS Version | Affected Ranges | Fix Versions |
|---|---|---|---|---|---|
| node-forge | npm | - | - | <1.3.2 | 1.3.2 |
CVSS:4 Severity and metrics
The CVSS metrics represent different qualitative aspects of a vulnerability that impact the overall score, as defined by the CVSS Specification.
The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology. This can mean an attack must be launched from the same shared physical (e.g., Bluetooth or IEEE 802.11) or logical (e.g., local IP subnet) network, or from within a secure or otherwise limited administrative domain (e.g., MPLS, secure VPN to an administrative network zone). One example of an Adjacent attack would be an ARP (IPv4) or neighbor discovery (IPv6) flood leading to a denial of service on the local LAN segment (e.g., CVE-2013-6014).
Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.
The successful attack does not depend on the deployment and execution conditions of the vulnerable system. The attacker can expect to be able to reach the vulnerability and execute the exploit under all or most instances of the vulnerability.
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges.
There is no loss of confidentiality within the Vulnerable System.
There is no loss of confidentiality within the Subsequent System or all confidentiality impact is constrained to the Vulnerable System.
There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the Vulnerable System. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the Vulnerable System.
There is no loss of integrity within the Subsequent System or all integrity impact is constrained to the Vulnerable System.
There is no impact to availability within the Vulnerable System.
There is no impact to availability within the Subsequent System or all availability impact is constrained to the Vulnerable System.
NIST
3.9
CVSS SCORE
8.6highDebian
-
Ubuntu
-
CVSS SCORE
N/AmediumChainguard
CGA-2386-4h54-xfjc
-
Chainguard
CGA-43vw-ww37-8g27
-
Chainguard
CGA-7h3j-3wp6-6642
-
Chainguard
CGA-7r2r-5g38-3m4h
-
Chainguard
CGA-8c5p-v3g4-7g77
-
Chainguard
CGA-8qqr-h486-ww8h
-
Chainguard
CGA-9933-xvjj-p29j
-
Chainguard
CGA-9xgv-p74p-x78h
-
Chainguard
CGA-cvcq-96c5-mhjx
-
Chainguard
CGA-fc76-ww5v-4jjg
-
Chainguard
CGA-gxg8-2x8j-fx45
-
Chainguard
CGA-hjrq-mg2c-x7qv
-
Chainguard
CGA-mpvq-ccpq-p9jx
-
Chainguard
CGA-mx57-v2jv-3h64
-
Chainguard
CGA-qxqc-rvc9-7cxm
-
Chainguard
CGA-v6cc-9684-9h8q
-
minimos
MINI-4xpq-g55j-2p2f
-
minimos
MINI-64m3-7j2w-h5qj
-
minimos
MINI-6754-54wj-86rq
-
minimos
MINI-9g36-f3fw-5hhv
-
minimos
MINI-c53p-4vrc-322r
-
minimos
MINI-c6mh-3pv2-j99q
-
minimos
MINI-cm8p-5g4c-4pj6
-
minimos
MINI-fq97-pvjh-92p8
-
minimos
MINI-gg4x-rqjc-rq6j
-
minimos
MINI-h7v8-pj76-49cr
-
minimos
MINI-hqwm-2jmr-p652
-
minimos
MINI-mvfr-fxr4-4p2p
-
minimos
MINI-vr9g-2rpc-q3cw
-