CVE-2025-66031
ADVISORY - githubSummary
Summary
An Uncontrolled Recursion (CWE-674) vulnerability in node-forge versions 1.3.1 and below enables remote, unauthenticated attackers to craft deep ASN.1 structures that trigger unbounded recursive parsing. This leads to a Denial-of-Service (DoS) via stack exhaustion when parsing untrusted DER inputs.
Details
An ASN.1 Denial of Service (Dos) vulnerability exists in the node-forge asn1.fromDer function within forge/lib/asn1.js. The ASN.1 DER parser implementation (_fromDer) recurses for every constructed ASN.1 value (SEQUENCE, SET, etc.) and lacks a guard limiting recursion depth. An attacker can craft a small DER blob containing a very large nesting depth of constructed TLVs which causes the Node.js V8 engine to exhaust its call stack and throw RangeError: Maximum call stack size exceeded, crashing or incapacitating the process handling the parse. This is a remote, low-cost Denial-of-Service against applications that parse untrusted ASN.1 objects.
Impact
This vulnerability enables an unauthenticated attacker to reliably crash a server or client using node-forge for TLS connections or certificate parsing.
This vulnerability impacts the ans1.fromDer function in node-forge before patched version 1.3.2.
Any downstream application using this component is impacted. These components may be leveraged by downstream applications in ways that enable full compromise of availability.
Common Weakness Enumeration (CWE)
Uncontrolled Recursion
Uncontrolled Recursion
GitHub
-
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 no loss of integrity within 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 a total loss of availability, resulting in the attacker being able to fully deny access to resources in the Vulnerable System; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the Vulnerable System (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).
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.7highDebian
-
Ubuntu
3.9
CVSS SCORE
7.5mediumChainguard
CGA-2ppc-gfh3-39w2
-
Chainguard
CGA-3qj7-9hc3-9574
-
Chainguard
CGA-3rrw-425g-jh6h
-
Chainguard
CGA-7fw8-j7jc-4qfp
-
Chainguard
CGA-87gw-rq9m-p9gr
-
Chainguard
CGA-9p5g-3p63-v7h9
-
Chainguard
CGA-f8hv-jg2q-7vc9
-
Chainguard
CGA-fvvp-x86q-x35f
-
Chainguard
CGA-ghh4-7wcp-fh6p
-
Chainguard
CGA-hf38-73f5-4pq6
-
Chainguard
CGA-jhq4-w45r-2j6v
-
Chainguard
CGA-jr99-29jg-m4vw
-
Chainguard
CGA-mj97-hrpq-85j8
-
Chainguard
CGA-p88j-4w5g-cwfv
-
Chainguard
CGA-vr2g-r9vh-vpp2
-
Chainguard
CGA-x47v-cxf8-fv45
-
minimos
MINI-2xx9-vpfh-7cr7
-
minimos
MINI-3f9f-gj6x-xx42
-
minimos
MINI-6gqj-28v8-77px
-
minimos
MINI-7m5w-jcw4-65g7
-
minimos
MINI-8xjc-674p-wm77
-
minimos
MINI-g369-9p2r-xg84
-
minimos
MINI-g43g-9mh3-fjmq
-
minimos
MINI-g4hc-rxvj-63pv
-
minimos
MINI-jqxj-wxrh-5g6w
-
minimos
MINI-m8w4-cwhg-vxhq
-
minimos
MINI-mrhw-vh2j-594c
-
minimos
MINI-pc3h-mxhr-q5vf
-
minimos
MINI-rm5g-qr59-9p3g
-