CVE-2020-14967: RSA PKCS#1 decryption vulnerability in jsrsasign

jsrsasign Updated 02 Oct 2025

Summary

26/06/2020
Yes i
Critical
9.8

CVE-2020-14967: RSA PKCS#1 decryption vulnerability with prepending zeros in jsrsasign. Affects jsrsasign versions < 8.0.18. Fixed in 8.0.18. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The jsrsasign package is an open-source library that provides various cryptographic functions for JavaScript applications. It includes support for RSA PKCS#1 v1.5 and RSA-OAEP encryption and decryption. These encryption schemes are commonly used for securing sensitive data in web applications.

Vulnerability Detail

This vulnerability in jsrsasign allows an attacker to decrypt a crafted message with prepending zeros. The vulnerability affects the RSA PKCS#1 v1.5 and RSA-OAEP decryption functionality of the library. By exploiting this vulnerability, an attacker can decrypt encrypted messages that should be secure. However, the risk of content forgery and memory corruption is low due to the use of the BigInteger class in jsrsasign.

How To Fix

Minimum fixed version

8.0.18

This is the first release that contains the fix.

npm install jsrsasign@8.0.18

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 feasible, a workaround is to reject RSA PKCS#1 v1.5 or RSA-OAEP encrypted messages with unnecessary prepending zeros. This can be done by implementing additional checks in the decryption process to detect and reject such messages.

Conclusion

The RSA PKCS#1 decryption vulnerability in jsrsasign can be mitigated by upgrading to version 8.0.18 or later. Alternatively, implementing the provided workaround can help reject vulnerable encrypted messages. It is important to take action to ensure the security of encrypted data in applications that use RSA PKCS#1 v1.5 or RSA-OAEP encryption. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jsrsasign →

Share this vulnerability

FAQ

The impact of this vulnerability is relatively low. While it allows for the decryption of crafted messages, the risk of content forgery and memory corruption is low. The vulnerability primarily affects the security of encrypted messages using RSA PKCS#1 v1.5 or RSA-OAEP encryption.

Users of the jsrsasign library who utilize RSA PKCS#1 v1.5 or RSA-OAEP decryption are affected by this vulnerability. Applications that do not use these encryption schemes are not affected.

To mitigate the risk, it is recommended to upgrade to the latest version of jsrsasign (8.0.18 or later) that includes a patch for this vulnerability. Alternatively, you can implement the provided workaround to reject encrypted messages with unnecessary prepending zeros.

There are no known exploits for this vulnerability at the time of this report. However, it is still important to apply the recommended fixes to ensure the security of encrypted messages.

You can find more information about this vulnerability in the National Vulnerability Database (NVD) entry: https://nvd.nist.gov/vuln/detail/CVE-2020-14967

Related vulnerabilities

Recent vulnerabilities recorded for jsrsasign.

How To Fix

Minimum fixed version

8.0.18

This is the first release that contains the fix.

npm install jsrsasign@8.0.18

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback