# CVE-2020-14968: jsrsasign RSA-PSS signature validation bypass via prepended zeros

Source: https://junglewise.ai/threats/cve-2020-14968-jsrsasign-rsa-pss-signature-validation-bypass-via-prepended-zeros  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-06-26. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2020-14968 · Severity: low · CVSS 3.1 · Published 2020-06-26

jsrsasign is a JavaScript library for cryptographic operations including RSA digital signature verification. The library incorrectly accepts RSA-PSS signatures with leading zero bytes as valid, allowing an attacker to forge signatures on messages. This could compromise the integrity of applications relying on jsrsasign for signature validation, such as token verification systems or document signing applications.

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

## Quick answers

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

**How severe is CVE-2020-14968?** Low severity, with a CVSS score of 3.1, published 26 June 2020.

**Which products and versions are affected?** jsrsasign (npm) SEMVER:introduced=3.0.0,fixed=8.0.17.

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

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

**Am I affected by CVE-2020-14968?** 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 8.0.17 or later

  ```sh
  npm install jsrsasign@8.0.17
  ```


## Technical details

The vulnerability is a cryptographic signature validation weakness in jsrsasign's RSA-PSS implementation. The library converts signatures to BigInteger and fails to enforce strict encoding rules, accepting signatures with unnecessary prepending zeros that should be rejected per RFC 8017. An attacker with knowledge of a valid RSA-PSS signature can craft a forged variant with prepended zeros that the library will incorrectly validate as authentic. The attack requires no authentication or special privileges, only network access to an application using vulnerable jsrsasign for RSA-PSS verification. The vulnerability is limited to applications explicitly using RSA-PSS signature validation; other cryptographic operations are unaffected. Patch 8.0.17 and later versions include fixes.

## Affected products

- kjur jsrsasign 3.0.0 to 8.0.16

## Identifiers

- CVE-2020-14968
- GHSA-q3gh-5r98-j4h3

## Timeline

- 2020-06-22: disclosed
- 2020-06-23: patched: Version 8.0.17 released
- 2020-06-26: advisory

## References

- [https://github.com/kjur/jsrsasign/security/advisories/GHSA-q3gh-5r98-j4h3](https://github.com/kjur/jsrsasign/security/advisories/GHSA-q3gh-5r98-j4h3)

## 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 incorrect numeric conversion in BigInteger modPow](https://junglewise.ai/threats/cve-2026-4602-jsrsasign-incorrect-numeric-conversion-in-biginteger-modpow)
- [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)
