CVE-2021-30246: RSA signature validation vulnerability in jsrsasign

jsrsasign Updated 02 Oct 2025

Summary

16/04/2021
Yes i
Critical
9.1

CVE-2021-30246: RSA signature validation vulnerability on maleable encoded message in jsrsasign. Affects jsrsasign versions < 10.2.0. Fixed in 10.2.0. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The jsrsasign package is an open-source library that provides various cryptographic functions, including RSA signature validation. It is commonly used in JavaScript applications for secure communication and data integrity. However, a vulnerability has been discovered in jsrsasign that allows for the acceptance of RSA signatures with improper PKCS#1.5 padding. This vulnerability can potentially lead to the acceptance of maliciously crafted signatures, compromising the security of the application.

Vulnerability Detail

The vulnerability in jsrsasign arises from the improper validation of RSA signatures. Normally, the decoded RSA signature value should have a byte length equal to the RSA key length. However, this check was not sufficient, allowing for the acceptance of signatures with malleable encoded messages. An attacker could exploit this vulnerability by crafting a message with a manipulated signature, potentially leading to unauthorized access, data tampering, or other malicious activities. It is important to note that creating a practical attack using this vulnerability is extremely difficult.

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

10.2.0

This is the first release that contains the fix.

npm install jsrsasign@10.2.0

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

Workaround

There is no known workaround for this vulnerability. It is recommended to avoid using RSA signature validation in jsrsasign until the package has been updated to a secure version.

Conclusion

The RSA signature validation vulnerability in jsrsasign can potentially lead to the acceptance of maliciously crafted signatures, compromising the security of JavaScript applications. Users should upgrade to version 10.2.0 or later to fix this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for jsrsasign →

Share this vulnerability

FAQ

jsrsasign is an open-source library that provides cryptographic functions, including RSA signature validation, for JavaScript applications.

This vulnerability allows for the acceptance of RSA signatures with improper padding, potentially leading to unauthorized access, data tampering, or other malicious activities.

To fix this vulnerability, upgrade to jsrsasign version 10.2.0 or later, which includes the necessary patches for proper RSA signature validation.

No, there is no known workaround for this vulnerability. It is recommended to avoid using RSA signature validation in jsrsasign until the package has been updated.

This vulnerability was reported and analyzed by Daniel Yahyazadeh (@yahyazadeh).

Related vulnerabilities

Recent vulnerabilities recorded for jsrsasign.

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

10.2.0

This is the first release that contains the fix.

npm install jsrsasign@10.2.0

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