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.
Users validating RSA signature should upgrade to 10.2.0 or later.
There is no workaround. Not to use RSA signature validation in jsrsasign.
Thanks to Daniel Yahyazadeh @yahyazadeh for reporting and analyzing this vulnerability.
{ "nvd_published_at": "2021-04-07T21:15:00Z", "cwe_ids": [ "CWE-347" ], "severity": "CRITICAL", "github_reviewed": true, "github_reviewed_at": "2021-04-13T17:30:34Z" }