# CVE-2026-33891: Forge has Denial of Service via Infinite Loop in BigInteger.modInverse() with Zero Input

> An attacker can cause a denial of service by triggering an infinite loop in the BigInteger.modInverse function with zero input, hanging the application.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2026
- **Updated:** 4 Sep 2026
- **Also known as:** CLEANSTART-2026-AG97190, CLEANSTART-2026-TT50115, CLEANSTART-2026-ZJ53876, CLSA-2026-1790542136, GHSA-5m6q-g25r-mvwx, MINI-2h52-wpw5-crhv, MINI-3c5g-4g65-xw8q, MINI-3w9x-pwjj-9jv5, MINI-8h2r-jxmv-8h48, MINI-8m8p-xfxr-55g6, MINI-8vv8-h6w8-xx9v, MINI-9q6x-78g6-9x43, MINI-c7pm-3cxp-63gj, MINI-fw4h-367h-vv8j, MINI-gx39-xf3h-366x, MINI-hxq7-2mf6-6vm6, MINI-mx3c-mf56-3235, MINI-p65p-7j3p-vr23, MINI-qgvf-v8rx-gvg2, MINI-qvvh-xhm5-fmp3, MINI-rcxx-85p5-w33x, MINI-v7pr-p26w-vc4w, MINI-v9fm-5fwj-jqxc, MINI-w23q-9x6j-fqvw, ROOT-APP-NPM-CVE-2026-33891, UBUNTU-CVE-2026-33891

## What is CVE-2026-33891?

CVE-2026-33891 is a high-severity denial of service vulnerability in digitalbazaar forge, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.4.0, a Denial of Service (DoS) vulnerability exists in the node-forge library due to an infinite loop in the BigInteger.modInverse() function (inherited from the bundled jsbn library). When modInverse() is called with a zero value as input, the internal Extended Euclidean Algorithm enters an unreachable exit condition, causing the process to hang indefinitely and consume 100% CPU. Version 1.4.0 patches the issue.

Weakness: CWE-606 (Unchecked Input for Loop Condition), CWE-835 (Loop with Unreachable Exit Condition)

## Which versions are affected by CVE-2026-33891?

2 open source packages ship an affected version, including node-forge. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `node-forge` | npm | All versions | 1.4.0 |
| `node-forge` | npm | All versions | 1.4.0 |

Products: Digitalbazaar Forge.

## How do I fix CVE-2026-33891?

Upgrade node-forge to 1.4.0 or later.

## Is CVE-2026-33891 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33891 exists.

## Other vulnerabilities in digitalbazaar forge

- [CVE-2020-7720](https://insights.sbomify.com/CVE-2020-7720/): Prototype Pollution (critical 9.8)
- [CVE-2025-66031](https://insights.sbomify.com/CVE-2025-66031/): node-forge ASN.1 Unbounded Recursion (high 8.7)
- [CVE-2025-12816](https://insights.sbomify.com/CVE-2025-12816/): CVE-2025-12816 (high 8.6)
- [CVE-2026-33894](https://insights.sbomify.com/CVE-2026-33894/): Forge has signature forgery in RSA-PKCS due to ASN.1 extra field (high 7.5)
- [CVE-2026-33895](https://insights.sbomify.com/CVE-2026-33895/): Forge has signature forgery in Ed25519 due to missing S > L check (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-33891 and fix it if it is affected.

What it is: CVE-2026-33891 is a high-severity denial of service vulnerability in digitalbazaar forge, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33891 exists.

Affected packages and fixed versions:
- node-forge (npm): affected all versions; fixed in 1.4.0
- node-forge (npm): affected all versions; fixed in 1.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-33891/ (Markdown: https://insights.sbomify.com/CVE-2026-33891/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-33891
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-33891
- OSV: https://osv.dev/vulnerability/CVE-2026-33891

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-33891/
Summaries are generated and may contain mistakes; the official description above is the record.
