CVE-2020-14966: ECDSA signature validation vulnerability in jsrsasign
Summary
CVE-2020-14966: ECDSA signature validation vulnerability by accepting wrong ASN.1 encoding in jsrsasign. Affects jsrsasign versions >= 4.0.0, < 8.0.19. Fixed in 8.0.19. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The jsrsasign package is an open-source library that provides various cryptographic functions, including ECDSA signature validation. It supports the validation of ECDSA signatures represented by ASN.1 DER encoding. However, a vulnerability in the library allows it to accept incorrectly encoded signatures, such as those with wrong multi-byte ASN.1 length, prepended zeros in ASN.1 INTEGER value, or appended zeros to the signature. This vulnerability affects all ECC curve parameters and may accept semantically equivalent but malleable ECDSA signatures. It is important to note that this vulnerability does not impact non-ASN.1 format signatures or implementations that perform strict ASN.1 DER checking.
Vulnerability Detail
The vulnerability in jsrsasign allows the acceptance of incorrectly encoded ECDSA signatures. This can lead to the acceptance of forged or crafted messages as valid signatures. While the risk of memory corruption is low due to the use of the BigInteger class, the acceptance of malleable ECDSA signatures increases the risk of accepting invalid signatures as valid. It is worth noting that there are no specific standards requiring ASN.1 DER encoding for ECDSA signatures, but most implementations, like OpenSSL, perform strict ASN.1 DER checking.
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
8.0.19
This is the first release that contains the fix.
npm install jsrsasign@8.0.19
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
A workaround for this vulnerability is to perform strict ASN.1 DER checking for ASN.1 encoded ECDSA signature values. This can be done by using the checkStrictDER function from the ASN1HEX module in the jsrsasign library.
Conclusion
The jsrsasign package contains a vulnerability that allows the acceptance of incorrectly encoded ECDSA signatures. Upgrading to version 8.0.19 or later fixes this vulnerability by implementing strict ASN.1 DER checking. Performing strict ASN.1 DER checking for ASN.1 encoded ECDSA signature values is also a recommended workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for jsrsasign →
FAQ
This vulnerability allows the acceptance of incorrectly encoded ECDSA signatures, which can lead to the acceptance of forged or crafted messages as valid signatures.
Yes, this vulnerability affects all ECC curve parameters.
The risk of memory corruption is low since jsrsasign uses the BigInteger class.
No, the risk of memory corruption is low due to the use of the BigInteger class.
Yes, there are many malleable variants of ECDSA signatures that can be accepted as valid.
References
Related vulnerabilities
Recent vulnerabilities recorded for jsrsasign.