CVE-2021-30246
JSON

9.1critical

RSA signature validation vulnerability on maleable encoded message in jsrsasign

Severity
9.1critical CVSS:3.1 by NVD
Exploit likelihood
0.96% (higher than 62% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-27fj-mc8w-j9wg

Description

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

Product or packageVersionsReported by
Unspecified productn/aCVE List
jsrsasign (npm)before 10.2.0GitHub Advisory Database
kjur jsrsasignup to 10.1.13NVD

All scores

GitHub9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD6.4medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

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.

GitHub Advisory Database
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.

NVD (es)

En el paquete jsrsasign versiones hasta 10.1.13 para Node.js, algunas firmas RSA PKCS#1 v1.5, firmas son erróneamente reconocidas como válidas. NOTA: No es conocido un ataque práctico

References

Sources

SourceRecordLicence
CVE ListCVE-2021-30246 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-27fj-mc8w-j9wg changed 2023-11-08CC-BY-4.0
NVDCVE-2021-30246 changed 2026-06-22Public domain