Vulnerability · CVE-2026-118781
Forge: Denial of Service via infinite loop in BigInteger.modInverse() with negative input (incomplete fix of CVE-2026-33891)
Published Oct 29, 2026 · catalog updated Oct 30, 2026 · Forge: Denial of Service
Last checked Oct 31, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-118781. EPSS is 0.12%. Act only if a listed version of Forge: Denial of Service is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Forge: Denial of Service).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
Same product and reporting
- CVE-2026-33896 · Critical
- CVE-2026-33895 · High
- CVE-2026-33894 · High
- CVE-2026-33891 · High
- CVE-2025-66030 · Medium
- Severity
- Low2.9
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.12%
- Remediation
- Version ranges on file
- Affected products
- npm node-forge · vendor digitalbazaar forge
### Summary in node-forge's bundled jsbn library enters an infinite loop when the value or the modulus is negative, for example when a negative public exponent is passed to . This is an incomplete fix of CVE-2026-33891 (GHSA-5m6q-g25r-mvwx), which handled only a zero value. Fixed in node-forge 1.4.1. ### Details ( , exposed as ) implements the binary extended Euclidean algorithm (Handbook of Applied Cryptography, Algorithm 14.61), which is defined for positive integers. With a negative operand the loop cannot terminate: is an arithmetic shift, so a negative value never moves towards zero, and the loop's exit condition ( reaching zero) is never met. The calling thread spins at 100% CPU indefinitely; in Node.js this blocks the event loop. Memory does not grow. node-forge 1.4.0 fixed CVE-2026-33891 (GHSA-5m6q-g25r-mvwx) by returning zero early when , although its changelog describes the check as "<= 0". Negative values were not covered, and a negative modulus was never handled. Every negative input that did terminate already returned zero. Within node-forge, RSA key generation is the only path to a negative operand: the caller's public exponent becomes , and is called with it. works on absolute values, so the coprimality checks pass and the loop is reached. Any exponent other than 3 or 65537 uses the pure JavaScript implementation, even when is not set. RFC 8017, Section 3.1 requires the RSA public exponent to be at least 3. Values that node-forge parses (DER, PEM, JWK, PKCS#12, X.509, TLS) are always read as unsigned integers and cannot produce a negative operand. The fix makes return zero when the value or the modulus is zero or negative, as it already does when no inverse exists. Results for positive inputs are unchanged. This issue was reported by wzc. ### Patches Fixed in node-forge 1.4.1. now returns zero when the value or the modulus is zero or negative. ### Workarounds - Pass only fixed, valid RSA public exponents (e.g. 65537) to key generation, or validate cal
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- npm node-forge<= 1.4.0
- vendor digitalbazaar forgeversion unspecified
How to fix CVE-2026-118781
Upgrade
CVE-2026-118781 lists a fix boundary at 1.4.0. Compare the installed build with that boundary before you change production.
Version check
Affected <= 1.4.0
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-118781. EPSS is 0.12%. Act only if a listed version of Forge: Denial of Service is installed.
Which versions are affected?
Compare what you have installed with <= 1.4.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-835: Infinite Loop. EPSS 0.12%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 30, 2026 · GitHub Advisory Database
Detected
### Summary in node-forge's bundled jsbn library enters an infinite loop when the value or the modulus is negative, for example when a negative public exponent is passed to . This is an incomplete fix of CVE-2026-33891 (GHSA-5m6q-g25r-mvwx), which handled only a zero value. Fixed in node-forge 1.4.1. ### Details ( , exposed as ) implements the binary extended Euclidean algorithm (Handbook of Appli
Oct 30, 2026 · GitHub Advisory Database
Updated
### Summary in node-forge's bundled jsbn library enters an infinite loop when the value or the modulus is negative, for example when a negative public exponent is passed to . This is an incomplete fix of CVE-2026-33891 (GHSA-5m6q-g25r-mvwx), which handled only a zero value. Fixed in node-forge 1.4.1. ### Details ( , exposed as ) implements the binary extended Euclidean algorithm (Handbook of Appli
Sources
- CVE.orgVulnerability recordCVE-2026-118781
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the affected implementation used BigInteger.prototype.modInverse(), bnModInverse(), lib/jsbn.js, RSA public exponent e to process the relevant input or security de
cve.org - GitHub Advisory DatabasePackage advisoryGHSA-h6cr-wjv9-3cpp
Forge: Denial of Service via infinite loop in BigInteger.modInverse() with negative input (incomplete fix of CVE-2026-33891)
github.com
References
Freshness
Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- CVE.orgOct 31, 2026
- GitHub Advisory DatabaseOct 31, 2026