Skip to main content
CVE-2026-118781VulnerabilityPublished

node-forge · Forge: Denial of Service via infinite loop in BigInteger.modInverse() with negative input (incomplete fix of

Affects node-forgeSource GCVE Database

0
Compare

Mentioned vulnerabilities

Authoritative record:CVE-2026-118781· Low 2.9

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

CVSS 3.1 base score
2.9Low
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.12.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:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 29 Oct 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
npmnode-forgeAffected
  • <1.4.1
Fixed in
  • 1.4.1

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

Community reviews

Loading reviews…