Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. node-forge
  4. ›
  5. CVE-2026-33891

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

March 26, 2026

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. Affected Package

Package name: node-forge (npm: node-forge) Repository: https://github.com/digitalbazaar/forge Affected versions: All versions (including latest) Affected file: lib/jsbn.js, function bnModInverse() Root cause component: Bundled copy of the jsbn (JavaScript Big Number) library

References

  • github.com/advisories/GHSA-5m6q-g25r-mvwx
  • github.com/digitalbazaar/forge
  • github.com/digitalbazaar/forge/commit/9bb8d67b99d17e4ebb5fd7596cd699e11f25d023
  • github.com/digitalbazaar/forge/security/advisories/GHSA-5m6q-g25r-mvwx
  • nvd.nist.gov/vuln/detail/CVE-2026-33891

Code Behaviors & Features

Detect and mitigate CVE-2026-33891 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.4.0

Fixed versions

  • 1.4.0

Solution

Upgrade to version 1.4.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

npm/node-forge/CVE-2026-33891.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 27 Mar 2026 00:18:01 +0000.