CVE-2020-14968: RSA-PSS signature validation vulnerability in jsrsasign
Summary
CVE-2020-14968: RSA-PSS signature validation vulnerability by prepending zeros in jsrsasign. Affects jsrsasign versions >= 3.0.0, < 8.0.17. Fixed in 8.0.17. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The jsrsasign package is an open-source library that provides various cryptographic functions for JavaScript applications. It includes features for RSA key generation, encryption, decryption, and signature verification. The package is widely used in web applications for implementing secure communication and data integrity. However, a vulnerability has been discovered in the RSA-PSS signature validation process of jsrsasign.
Vulnerability Detail
The vulnerability in jsrsasign allows for the acceptance of RSA-PSS signature values with prepended zeros as valid signatures. This means that even if a signature value has unnecessary zeros at the beginning, it will still be considered valid by the library. While the risk of accepting forged or crafted messages is low, there is a potential for a memory corruption issue. However, since jsrsasign uses the BigInteger class, the risk of memory corruption is also low. It is important to note that this vulnerability only affects users who are utilizing RSA-PSS signature validation.
How To Fix
Latest published version: 11.1.5 as of 23 Oct 2026
npm install jsrsasign@11.1.5
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
8.0.17
This is the first release that contains the fix.
npm install jsrsasign@8.0.17
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the latest version is not immediately possible, a workaround is to reject RSA-PSS signatures with unnecessary prepended zeros. This can be done by implementing additional validation checks in the signature verification process.
Conclusion
The vulnerability in jsrsasign's RSA-PSS signature validation can be addressed by upgrading to version 8.0.17 or later. In the meantime, users can implement a workaround to reject RSA-PSS signatures with unnecessary prepended zeros. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for jsrsasign →
FAQ
Jsrsasign is an open-source JavaScript library that provides cryptographic functions for RSA key generation, encryption, decryption, and signature verification.
RSA-PSS is a signature scheme that combines the RSA algorithm with the Probabilistic Signature Scheme (PSS). RSA-PSS signature validation is the process of verifying the authenticity and integrity of a message using RSA-PSS signatures.
The vulnerability in jsrsasign allows for the acceptance of RSA-PSS signature values with prepended zeros as valid signatures. This means that even if a signature value has unnecessary zeros at the beginning, it will still be considered valid by the library.
The risk of accepting forged or crafted messages to be signed is low. Additionally, the risk of memory corruption is also low since jsrsasign uses the BigInteger class.
To mitigate the vulnerability, users of jsrsasign should upgrade to version 8.0.17 or later. Alternatively, they can reject RSA-PSS signatures with unnecessary prepended zeros until the upgrade is performed.
References
Related vulnerabilities
Recent vulnerabilities recorded for jsrsasign.