CVE-2021-30246: Critical severity Jsrsasign Project Jsrsasign Node.js vulnerability
Impact Vulnerable jsrsasign will accept RSA signature with improper PKCS#1.5 padding. Decoded RSA signature value consists following form: 01(ff...(8 or more ffs)...ff)00[ASN.1 OF DigestInfo] Its byte length must be the same as RSA key length, however such checking was not sufficient.
To make crafted message for practical attack is very hard.
Patches Users validating RSA signature should upgrade to 10.2.0 or later.
Workarounds There is no workaround. Not to use RSA signature validation in jsrsasign.
ACKNOWLEDGEMENT Thanks to Daniel Yahyazadeh @yahyazadeh for reporting and analyzing this vulnerability.
Other sources
In the jsrsasign package through 10.1.13 for Node.js, some invalid RSA PKCS#1 v1.5 signatures are mistakenly recognized to be valid. NOTE: there is no known practical attack.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/jsrsasignto a version that resolves this vulnerability.Fixed in 10.2.0 - Compensating control
Do not use RSA signature validation in jsrsasign versions through 10.1.13 (avoid performing RSA PKCS#1 v1.5 signature validation with vulnerable versions) until upgraded to 10.2.0 or later.
Event History
Frequently Asked Questions
What is the severity of CVE-2021-30246?
The severity of CVE-2021-30246 is critical with a severity value of 9.1.
What is the impact of CVE-2021-30246?
CVE-2021-30246 allows the acceptance of RSA signatures with improper PKCS#1.5 padding, which can lead to vulnerabilities in the jsrsasign package.
How can I fix CVE-2021-30246?
To fix CVE-2021-30246, update the jsrsasign package to version 10.2.0 or higher.
What is the affected software for CVE-2021-30246?
The affected software for CVE-2021-30246 includes jsrsasign package versions up to and including 10.1.13 for Node.js.
What is the Common Weakness Enumeration (CWE) for CVE-2021-30246?
The Common Weakness Enumeration (CWE) for CVE-2021-30246 is CWE-347.