Forge(node-forge)にリソース枯渇の脆弱性、CPUとメモリを大量に消費するおそれ
Summary
Forge(node-forge)のasn1.fromDer()で、BIT STRINGに入れ子になったDERを解析すると、再帰処理とメモリ消費が過剰になり、サービスが停止するおそれがあります。影響を受けるのは1.4.1より前の版で、1.4.1で修正されています。Forgeを利用しているアプリケーションは、1.4.1以降に更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Forge(node-forge)のasn1.fromDer()で、BIT STRINGに入れ子になったDERを解析すると、再帰処理とメモリ消費が過剰になり、サービスが停止するおそれがあります。影響を受けるのは1.4.1より前の版で、1.4.1で修正されています。Forgeを利用しているアプリケーションは、1.4.1以降に更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| digitalbazaarforge | — | Not listed |
| npmnode-forge |
< 1.4.1→ 1.4.1 |
1.4.1 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Ubuntu UBUNTU-CVE-2026-119191 node-node-forge No fixed version in this record
Original description The description as published by the source.
Summary
asn1.fromDer() decodes the contents of BIT STRINGs as ASN.1 by default. That decode ignored the maxDepth recursion limit (an incomplete fix of CVE-2025-66031) and also decoded nested BIT STRINGs, keeping a full copy of the decoded contents at each level, so small crafted DER or PEM inputs (certificates, keys, PKCS structures) use excessive CPU time and memory and can abort the Node.js process. Fixed in node-forge 1.4.1.
Details
asn1.fromDer() attempts by default to decode the contents of primitive BIT STRINGs as ASN.1 (decodeBitStrings, default true). Two flaws in that decode in lib/asn1.js allow resource exhaustion:
_fromDer()started the BIT STRING decode with a new options object,{strict: true, decodeBitStrings: true}, that did not includemaxDepth. Inside that decode the depth check compared againstundefinedand never triggered, so the recursion limit added for CVE-2025-66031 (GHSA-554w-wpv2-vw27) was not enforced for anything below a decoded BIT STRING. Both the globalasn1.maxDepth(default 256) and the per-callmaxDepthoption were ignored there. Errors in this speculative decode, including stack overflows, are caught and the contents kept as raw bytes, so deep nesting is parsed instead of rejected. This is an incomplete fix of CVE-2025-66031.- BIT STRINGs nested inside decoded BIT STRING contents were decoded as well, and
asn1.create()gives each decoded BIT STRING a deep copy of its decoded contents (obj.original,…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com