node-forge · Forge: Denial of Service via infinite loop in BigInteger.modInverse() with negative input (incomplete fix of
Affects node-forgeSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 2.9 Low : upgrade to 1.4.1 when convenient.
Data as of 31 Oct 2026, 01:55 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 2.9 |
|---|
- Patch
- Available – fixed in 1.4.1
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 29 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade node-forge to 1.4.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmnode-forge | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade node-forge to version 1.4.1 or later, where the issue is fixed. Alternatively, ensure that only valid RSA public exponents (odd integers >= 3, such as 65537) are passed to key generation functions, and avoid calling BigInteger.modInverse() with negative operands by reducing values modulo a positive modulus first. The fix in 1.4.1 returns zero for zero or negative inputs, preventing the infinite loop.
Description
node-forge versions prior to 1.4.1 contain a denial of service vulnerability in the BigInteger.modInverse() function due to an infinite loop triggered by negative input values. This occurs when a negative value or modulus is passed, causing the function to spin indefinitely at 100% CPU and block the Node.js event loop. The issue is an incomplete fix of a previous vulnerability and affects RSA key generation when using negative public exponents. The vulnerability does not affect key parsing or standard usage with typical exponents like 65537. It was fixed in node-forge 1.4.1 by returning zero for zero or negative inputs.
References
- github.com/digitalbazaar/forge/security/advisories/GHSA-h6cr-wjv9-3cpp (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-118781 (opens in a new tab)
- github.com/digitalbazaar/forge/commit/e96c47b7f006dec66fb7bb1934e7375498b04a72 (opens in a new tab)
- github.com/digitalbazaar/forge (opens in a new tab)
- github.com/digitalbazaar/forge/releases/tag/v1.4.1 (opens in a new tab)