Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach app endpoint that builds RSA keys
-
DeliverySubmit negative/invalid public exponent e
-
ExploitValue reaches BigInteger.modInverse() in jsbn
-
ExecutionBinary extended Euclidean loop never terminates
-
PersistThread spins at 100% CPU, event loop blocked
-
ImpactService-wide denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitable only when the application passes an attacker-controlled RSA public exponent 'e' into forge.pki.rsa.generateKeyPair(), forge.pki.rsa.createKeyPairGenerationState(), or forge.pki.rsa.stepKeyPairGenerationState(), or calls forge.jsbn.BigInteger#modInverse() directly with a negative value or modulus derived from untrusted input. A negative (or otherwise sign-negative) operand is required; RFC 8017 requires e >= 3, so compliant exponents like 65537 never trigger it. Key limiting factors: the trigger is reachable only through the pure-JavaScript code path (any exponent other than 3 or 65537), it requires the application to forward untrusted input to key generation (a non-default, application-specific code path), and values node-forge parses from DER, PEM, JWK, PKCS#12, X.509, and TLS are always unsigned and CANNOT reach this bug. Impact is limited to CPU exhaustion / event-loop blocking; there is no confidentiality or integrity effect and memory does not grow. |
| Impact | This is a genuinely low-priority issue, and the available signals agree. The CVSS 3.1 base score is 2.9 (Low) with vector CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L - local attack vector, high complexity, no privileges, no user interaction, and availability-only impact (no confidentiality or integrity loss). The vuln.today decision label is 'monitor', consistent with the low score. No EPSS score was provided in the input, and there is no CISA KEV listing, so there is no evidence of active exploitation. A public proof-of-concept does exist inside the GHSA-h6cr-wjv9-3cpp advisory (a three-line snippet that hangs the process), but this demonstrates only the denial-of-service hang, not code execution or data compromise. The practical risk is tightly bounded by the trigger condition: the flaw is only reachable when an application passes an attacker-controlled RSA public exponent to node-forge key generation, or calls BigInteger#modInverse() directly with negative untrusted operands. The advisory explicitly states that all values node-forge parses (DER, PEM, JWK, PKCS#12, X.509, TLS) are read as unsigned and cannot trigger the issue, and that documented key-generation usage passes a constant exponent (65537). Note a minor cross-signal nuance: the vendor CVSS 3.1 vector uses AC:H while the informational CVSS 4.0 vector uses AC:L with AT:P (present attack requirement); both rate the issue Low and the vendor states the 3.1 rating governs. The realistic worst case is a single-threaded Node.js process spinning at 100% CPU with its event loop blocked; memory does not grow. |
| Exploit ScenarioDerived | An application exposes RSA key generation and forwards a user-supplied public exponent directly into forge.pki.rsa.generateKeyPair({e: ...}) (or the createKeyPairGenerationState/stepKeyPairGenerationState variants). An attacker submits a negative exponent such as e = -1, which reaches BigInteger.modInverse() and enters an infinite loop, pinning the CPU and blocking the Node.js event loop so the service stops handling all other requests. A public proof-of-concept demonstrating the hang is included in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Node-forge versions through 1.4.0 hang indefinitely at 100% CPU when BigInteger.prototype.modInverse() receives a negative value or negative modulus, and in forge this is reachable by passing a negative RSA public exponent e to forge.pki.rsa.generateKeyPair() or the stateful key-generation APIs. The flaw is an incomplete fix of CVE-2026-33891, which only guarded against a zero operand; only applications that forward untrusted input as the RSA exponent, or call modInverse() directly with negative operands, are affected, while keys parsed from DER, PEM, JWK, PKCS#12, X.509 and TLS are unsigned and cannot trigger it. No public exploit code or active exploitation is identified, the vendor rates it Low (CVSS 3.1: 2.9), and a documented proof of concept shows a single call blocking the Node.js event loop; version 1.4.1 resolves it.
RemediationAI
Vendor-released patch: node-forge 1.4.1, which changes the guard in lib/jsbn.js bnpModInverse to return zero when either the value or the modulus is negative (commit e96c47b7f006dec66fb7bb1934e7375498b04a72, release https://github.com/digitalbazaar/forge/releases/tag/v1.4.1, advisory https://github.com/digitalbazaar/forge/security/advisories/GHSA-h6cr-wjv9-3cpp); upgrade from any version <= 1.4.0 to 1.4.1. Where upgrading is not immediately possible, the vendor workarounds apply: pass only fixed, valid RSA public exponents such as 65537 to key generation rather than caller-supplied values, or validate any caller-supplied exponent first as an odd integer >= 3 per RFC 8017 Section 3.1 - trade-off is that any application legitimately accepting variable exponents loses that flexibility - and never call BigInteger#modInverse() with negative operands, reducing the value modulo a positive modulus first with x.mod(m).modInverse(m). Because triggering requires forwarding untrusted input into key generation or modInverse(), such call paths should also be treated as untrusted input boundaries until the patched version is deployed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
node-forge bundles the jsbn big-integer library, and its bnModInverse() in lib/jsbn.js implements the binary extended Euclidean algorithm (Handbook of Applied Cryptography, Algorithm 14.61), which is only defined for positive integers. Because rShiftTo performs an arithmetic shift, a negative operand never migrates toward zero, so the loop's exit condition (u reaching zero) is never satisfied - the defining characteristic of the CWE-835 infinite loop class. Within forge, the only path to a negative operand is RSA key generation: the caller's public exponent e becomes BigInteger.fromInt(e) and is passed to state.e.modInverse(state.phi), where gcd() compares absolute values so the coprimality checks pass and the loop is entered; any exponent other than 3 or 65537 uses the pure-JavaScript implementation even when forge.options.usePureJavaScript is not set. The 1.4.0 fix returned early only when this.signum() == 0, leaving negative values and negative moduli unhandled; the 1.4.1 change broadens the guard to this.signum() <= 0 || m.signum() <= 0, returning zero exactly as it already does when no inverse exists, with results for positive inputs unchanged.
Know when Forge gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Vector is an application API operand not a network/parse path (AV:L); reachable only via a non-default code path forwarding untrusted exponents (AC:H); availability-only hang (A:L, C/I:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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 decision. node-forge's bundled jsbn implementation entered an infinite loop when BigInteger.prototype.modInverse() received a negative value or modulus. An attacker who could control the RSA public exponent passed to key generation, or a direct modInverse() operand, could block the Node.js event loop at full CPU. Parsed DER, PEM, JWK, PKCS#12, X.509, and TLS values are unsigned and cannot trigger this issue. This issue is fixed in version 1.4.1.
Blast Radius
ecosystem impact- 6 npm packages depend on node-forge (3 direct, 3 indirect)
Ecosystem-wide dependent count for version 1.4.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
An interpretation-conflict (CWE-436) vulnerability in node-forge versions 1.3.1 and earlier enables unauthenticated atta
The package node-forge before 0.10.0 is vulnerable to Prototype Pollution via the util.setPath function. Rated high seve
RSA PKCS#1 v1.5 signature forgery in node-forge through v1.4.0 enables unauthenticated network attackers to craft signat
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi
Regular expression denial of service in node-forge's pem.decode() allows remote, unauthenticated attackers to block the
Denial of service in node-forge (Forge) 1.3.2 through 1.4.0 lets remote, unauthenticated attackers exhaust CPU time and
Denial of service in node-forge's JavaScript TLS implementation: a connection created with forge.tls.createConnection()
Call stack exhaustion in node-forge's TLS record processing (all versions through 1.4.0) allows a remote peer to crash o
PKCS#12 MAC forgery and constant-key password-based decryption in node-forge 1.4.0 and earlier let anyone who does not k
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi
Certificate chain validation in node-forge (Forge) through version 1.4.0 can be bypassed because the parser maps the dep
EUVD-2026-113339
GHSA-h6cr-wjv9-3cpp
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB