{"id":"CVE-2025-66031","aliases":["CVE-2025-66031","GHSA-554w-wpv2-vw27"],"related":[],"kind":"vulnerability","state":"published","title":"node-forge ASN.1 Unbounded Recursion","summary":"Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. An Uncontrolled Recursion 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. This issue has been patched in version 1.3.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. An Uncontrolled Recursion 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. This issue has been patched in version 1.3.2.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nAn 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.\n\n### Details\n\nAn 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.\n\n### Impact\n\nThis vulnerability enables an unauthenticated attacker to reliably crash a server or client using node-forge for TLS connections or certificate parsing.\n\nThis vulnerability impacts the ans1.fromDer function in `node-forge` before patched version `1.3.2`. \n\nAny downstream application using this component is impacted. These components may be leveraged by downstream applications in ways that enable full compromise of availability.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Forge (también llamado 'node-forge') es una implementación nativa de Transport Layer Security en JavaScript. Una vulnerabilidad de Recursión Incontrolada en las versiones 1.3.1 y anteriores de node-forge permite a atacantes remotos no autenticados crear estructuras ASN.1 profundas que desencadenan un análisis recursivo ilimitado. Esto conduce a una Denegación de Servicio (DoS) mediante el agotamiento de la pila al analizar entradas DER no confiables. Este problema ha sido parcheado en la versión 1.3.2.","source":"nvd"}],"published":"2025-11-26T22:08:37.000Z","modified":"2026-10-18T20:10:00.110Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"version":"< 1.3.2","status":"affected"}],"vendor":"digitalbazaar","product":"forge","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.3.2"}],"ecosystem":"npm","package":"node-forge","purl":"pkg:npm/node-forge","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.3.2"}],"vendor":"digitalbazaar","product":"forge","cpe":"cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/digitalbazaar/forge/security/advisories/GHSA-554w-wpv2-vw27","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/digitalbazaar/forge/commit/260425c6167a38aae038697132483b5517b26451","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/digitalbazaar/forge","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-11-28T18:26:11.800Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66031","url":"https://www.cve.org/CVERecord?id=CVE-2025-66031","licence":"CVE Terms of Use","modified":"2025-11-28T18:27:06.242Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-554w-wpv2-vw27","url":"https://github.com/advisories/GHSA-554w-wpv2-vw27","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:30.474Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66031","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66031","licence":"Public domain","modified":"2026-10-18T20:10:00.110Z"}],"updatedAt":"2026-11-25T22:59:08.054Z","epss":{"score":0.00548,"percentile":0.47287,"date":"2026-12-01T12:00:22.000Z"}}