Junglewise Threat Intelligence

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

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

Technologies: jsrsasign (npm). Vendors: npm.

Executive brief

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.

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

Timeline

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

References

Related threats