# CVE-2026-4602: jsrsasign incorrect numeric conversion in BigInteger modPow

Source: https://junglewise.ai/threats/cve-2026-4602-jsrsasign-incorrect-numeric-conversion-in-biginteger-modpow  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-23. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-4602 · Severity: high · CVSS 7.5 · Published 2026-03-23

jsrsasign is a popular JavaScript library used for digital signatures and cryptography. A flaw in how the library handles certain mathematical calculations allows an attacker to bypass security checks that verify the authenticity of digital signatures. This could allow unauthorized parties to forge signatures or provide invalid data that appears legitimate, potentially compromising the integrity of secure communications or software updates.

Technologies: [jsrsasign (npm)](https://junglewise.ai/threats/technologies/jsrsasign). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-4602 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-4602 being exploited in the wild.

**How severe is CVE-2026-4602?** High severity, with a CVSS score of 7.5, published 23 March 2026.

**Which products and versions are affected?** jsrsasign (npm) < 11.1.1, SEMVER:introduced=0,fixed=11.1.1.

**Is there a fix for CVE-2026-4602?** Yes. jsrsasign (npm): upgrade to 11.1.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-4602 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-4602?** Check whether you run jsrsasign (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- jsrsasign (npm): upgrade to 11.1.1 or later

  ```sh
  npm install jsrsasign@11.1.1
  ```


## Technical details

The vulnerability exists in the `ext/jsbn2.js` component of jsrsasign, specifically within the `modPow` function of the BigInteger implementation. The root cause is an 'Incorrect Conversion between Numeric Types' (CWE-681) where negative exponents were processed using two's-complement bit scanning without a sign check, leading to silent, incorrect modular exponentiation results. An attacker can exploit this by providing inputs that trigger calculations with negative exponents, effectively breaking the modular inverse logic required for RSA and other signature verification schemes. This allows for a signature verification bypass. The issue is fixed in version 11.1.1 by explicitly handling negative exponents using `modInverse`.

## Affected products

- kjur jsrsasign < 11.1.1

## Identifiers

- CVE-2026-4602
- GHSA-8qwj-4jxw-m8jw

## Timeline

- 2026-02-20: patched: Fix merged into master branch via PR #650
- 2026-03-23: disclosed: Initial advisory and CVE publication

## References

- [https://github.com/kjur/jsrsasign/pull/650](https://github.com/kjur/jsrsasign/pull/650)
- [https://github.com/kjur/jsrsasign/commit/5ea1c32bb2aa894b4bd29849839afe4f98728195](https://github.com/kjur/jsrsasign/commit/5ea1c32bb2aa894b4bd29849839afe4f98728195)
- [https://gist.github.com/Kr0emer/7ecd2be7d17419e4677315ef3758faf5](https://gist.github.com/Kr0emer/7ecd2be7d17419e4677315ef3758faf5)
- [https://security.snyk.io/vuln/SNYK-JS-JSRSASIGN-15371175](https://security.snyk.io/vuln/SNYK-JS-JSRSASIGN-15371175)
- [https://access.redhat.com/errata/RHSA-2026:19375](https://access.redhat.com/errata/RHSA-2026:19375)

## Related threats

- [jsrsasign division by zero in RSA public key parsing](https://junglewise.ai/threats/cve-2026-4603-jsrsasign-division-by-zero-in-rsa-public-key-parsing)
- [jsrsasign private key recovery via missing DSA check in signWithMessageHash](https://junglewise.ai/threats/cve-2026-4601-jsrsasign-private-key-recovery-via-missing-dsa-check-in)
- [kjur jsrsasign signature forgery via DSA domain parameter validation](https://junglewise.ai/threats/cve-2026-4600-kjur-jsrsasign-signature-forgery-via-dsa-domain-parameter)
- [jsrsasign private key recovery via biased DSA nonce generation](https://junglewise.ai/threats/cve-2026-4599-jsrsasign-private-key-recovery-via-biased-dsa-nonce-generation)
- [jsrsasign infinite loop in BigInteger.modInverse](https://junglewise.ai/threats/cve-2026-4598-jsrsasign-infinite-loop-in-biginteger-modinverse)
