CVE-2026-4598: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-4598 is an infinite loop (Denial of Service) vulnerability in the jsrsasign JavaScript cryptographic library, affecting all versions before 11.1.1. The flaw exists in the bnModInverse function within ext/jsbn2.js, where the BigInteger.modInverse implementation fails to handle zero or negative inputs, causing the process to hang permanently when supplied with crafted values such as modInverse(0, m) or modInverse(-1, m). The vulnerability was disclosed by researcher Kr0emer on February 18, 2026, and published publicly on March 23, 2026. It carries a CVSS v3.1 base score of 7.5 (High) and a CVSS v4.0 base score of 7.7 (High) (Snyk Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified as CWE-835 (Loop with Unreachable Exit Condition) and CWE-1287 (Improper Validation of Specified Type of Input). The bnModInverse function implements a binary extended GCD algorithm that assumes its input a is a positive integer coprime to m. Two classes of invalid input trigger infinite loops: Class A — zero input (a = 0), where gcd(0, m) = m ≠ 1 makes the loop exit condition permanently unreachable; and Class B — negative input, where the negative sign is not reduced modulo m before entering the binary GCD loop, causing subtraction steps to oscillate without convergence. Affected internal code paths include RSA blinding, EC field arithmetic (ECFieldElementFp.prototype.divide), and DSA/ECDSA signature verification internals. The fix, merged in PR #648, adds input normalization (x = this.mod(m)) and an early return when the normalized value is zero (GitHub Gist PoC, GitHub PR #648, GitHub Commit).

Impact

Successful exploitation causes a permanent hang of the Node.js process, resulting in a complete denial of service with high availability impact and no confidentiality or integrity impact. Any application using jsrsasign where untrusted input can reach the modInverse function — including those performing RSA operations, EC point arithmetic, or DSA/ECDSA signature verification — is vulnerable. A single crafted request is sufficient to permanently block the Node.js event loop with no timeout or automatic recovery, requiring a process restart to restore service (Snyk Advisory, GitHub Gist PoC).

Exploitability

A proof-of-concept script was published by the discoverer Kr0emer demonstrating both zero-input and negative-input hang vectors, though it requires local library access and does not constitute a weaponized remote exploit (GitHub Gist PoC). The CVSS v4.0 exploit maturity is rated "Proof of Concept." No confirmed in-the-wild exploitation has been reported, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is approximately 0.042% (24th percentile), indicating low near-term exploitation probability (Snyk Advisory). No threat actor attribution is available.

Exploitation steps

  1. Identify vulnerable targets: Locate applications using jsrsasign versions prior to 11.1.1 (e.g., via npm list jsrsasign or dependency scanning tools like Snyk or Qualys). Focus on services that accept untrusted cryptographic input — such as signature verification endpoints, certificate parsing APIs, or TLS-related services.
  2. Identify a reachable code path: Determine whether the target application exposes a network-accessible endpoint that internally calls BigInteger.modInverse — for example, ECDSA/DSA signature verification, RSA blinding operations, or EC point arithmetic.
  3. Craft a malicious input: Prepare a payload that causes modInverse to be called with a zero or negative BigInteger value. For ECDSA/DSA verification, this could be a crafted signature where the s component is 0 or negative. For EC operations, a crafted point with a zero z-coordinate may trigger the vulnerable path.
  4. Submit the crafted request: Send the malicious input to the target endpoint (e.g., via HTTP POST with a crafted JWT, certificate, or signature blob). No authentication is required if the endpoint is publicly accessible.
  5. Trigger the infinite loop: The bnModInverse function enters an infinite loop, permanently blocking the Node.js event loop. The process becomes unresponsive to all subsequent requests, achieving denial of service (GitHub Gist PoC, Snyk Advisory).

Indicators of compromise

  • Process Behavior: Node.js process CPU usage spikes to 100% on a single core and becomes permanently unresponsive; the event loop stops processing new requests with no error output.
  • Logs: Application logs show a sudden cessation of request processing after a specific inbound request; no crash or error stack trace is logged (the process hangs silently rather than throwing an exception).
  • Network: Repeated requests to cryptographic endpoints (e.g., signature verification, certificate validation, JWT processing) from the same source IP immediately before the service becomes unresponsive.
  • Application Monitoring: Health check endpoints stop responding; process monitors (e.g., PM2, systemd) may log repeated restarts of the Node.js service following unexplained hangs.

Mitigation and workarounds

The primary remediation is to upgrade jsrsasign to version 11.1.1 or later, which includes the fix merged in PR #648 that adds input normalization and zero-check guards to bnModInverse (GitHub Commit, GitHub PR #648). As a temporary workaround where immediate patching is not possible, implement application-level input validation to reject zero or negative values before they are passed to any modInverse-calling code path. Additionally, consider restricting network access to services using jsrsasign until the update can be applied, and configure process supervisors (e.g., PM2, systemd) with watchdog timers to automatically restart hung processes (Snyk Advisory).

Community reactions

The vulnerability was reported to Red Hat's security team and tracked as Bug 2450210 with high severity (Red Hat Bugzilla). Social media activity was observed on Mastodon and Bluesky shortly after disclosure, with automated CVE tracking accounts broadcasting the advisory. Coverage was also noted on threat intelligence aggregators including radar.offseq.com and exploit-intel.com. No major vendor statements beyond Red Hat's tracking entry or notable independent researcher commentary beyond the discoverer's own write-up have been identified.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-966w-4vpf-p7hcHIGH7.1
  • JavaScript logoJavaScript
  • @aloma.io/aloma
NoYesOct 25, 2026
GHSA-mrwp-f3q8-3g9pMEDIUM5.9
  • JavaScript logoJavaScript
  • follow-redirects
NoYesOct 25, 2026
GHSA-hfm3-x63j-7fxpHIGHN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/migrate
NoYesOct 25, 2026
GHSA-6244-vvv9-76f5MEDIUMN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/plugin
NoYesOct 25, 2026
GHSA-q53q-qg98-p9jfHIGHN/A
  • JavaScript logoJavaScript
  • llm-fw
NoYesOct 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management