Update dependency jsrsasign to v10 [SECURITY] #426
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^8.0.0
->^10.0.0
GitHub Vulnerability Alerts
CVE-2020-14966
Impact
Jsrsasign supports ECDSA signature validation which signature value is represented by ASN.1 DER encoding. This vulnerablity may accept a wrong ASN.1 DER encoded ECDSA signature such as:
This vulnerability was fixed by strict ASN.1 DER checking.
Here is an assessment of this vulnerability:
As discussed here, there is no standards like X9.62 which requires ASN.1 DER. So ASN.1 BER can be applied to ECDSA however most of implementations like OpenSSL do strict ASN.1 DER checking.
Patches
Users using ECDSA signature validation should upgrade to 8.0.19.
Workarounds
Do strict ASN.1 DER checking for ASN.1 encoded ECDSA signature value.
References
https://nvd.nist.gov/vuln/detail/CVE-2020-14966
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14966
https://vuldb.com/?id.157123
https://github.com/kjur/jsrsasign/issues/437
https://kjur.github.io/jsrsasign/api/symbols/KJUR.crypto.ECDSA.html
https://kjur.github.io/jsrsasign/api/symbols/ASN1HEX.html#.checkStrictDER
https://www.itu.int/rec/T-REC-X.690
GHSA-g753-jx37-7xwh
Impact
ECDSA side-channel attack named Minerava have been found and it was found that it affects to jsrsasign.
Execution time of thousands signature generation have been observed then EC private key which is scalar value may be recovered since point and scalar multiplication time depends on bits of scalar. In jsrsasign 8.0.13 or later, execution time of EC point and scalar multiplication is almost constant and fixed for the issue.
Patches
Users using ECDSA signature generation should upgrade to 8.0.13 or later.
Workarounds
There is no workarounds in jsrsasign. Update jsrsasign or use other ECDSA library.
ACKNOWLEDGEMENT
Thanks to Jan Jancar @J08nY, Petr Svenda and Vladimir Sedlacek of Masaryk University in Czech Republic to find and report this vulnerability.
References
https://minerva.crocs.fi.muni.cz/
https://www.npmjs.com/advisories/1505
https://github.com/kjur/jsrsasign/issues/411
CVE-2020-14968
Impact
Jsrsasign can verify RSA-PSS signature which value can expressed as BigInteger. When there is a valid RSA-PSS signature value, this vulnerability is also accept value with prepending zeros as a valid signature.
Patches
Users using RSA-PSS signature validation should upgrade to 8.0.17.
Workarounds
Reject RSA-PSS signatures with unnecessary prepending zeros.
References
GHSA-q3gh-5r98-j4h3
https://github.com/kjur/jsrsasign/issues/438
https://nvd.nist.gov/vuln/detail/CVE-2020-14968
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14968
https://vuldb.com/?id.157125
https://kjur.github.io/jsrsasign/api/symbols/RSAKey.html#.verifyWithMessageHashPSS
CVE-2020-14967
Impact
Jsrsasign supports RSA PKCS#1 v1.5 (i.e. RSAES-PKCS1-v1_5) and RSA-OAEP encryption and decryption. Its encrypted message is represented as BigInteger. When there is a valid encrypted message, a crafted message with prepending zeros can be decrypted by this vulnerability.
Patches
Users using RSA PKCS1-v1_5 or RSA-OAEP decryption should upgrade to 8.0.18.
Workarounds
Reject RSA PKCS1-v1_5 or RSA-OAEP encrypted message with unnecessary prepending zeros.
References
https://nvd.nist.gov/vuln/detail/CVE-2020-14967
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14967
https://vuldb.com/?id.157124
https://kjur.github.io/jsrsasign/api/symbols/KJUR.crypto.Cipher.html#.decrypt
https://github.com/kjur/jsrsasign/issues/439
CVE-2021-30246
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.
Release Notes
kjur/jsrsasign (jsrsasign)
v10.2.0
: CVE-2021-30246 RSAKey.verify issue fixCompare Source
v10.1.13
: add non-ascii BMPString supportCompare Source
v10.1.12
: fix for wrong UTF-8 encoding in distinguished name parserCompare Source
v10.1.11
: update X509.getVersion and add jsrsasign-util saveFileJSONCompare Source
empty(DEFAULT =v1) and [0] {INTEGER 2} (=v3).
Thus version checking is relaxed. (#471)
v10.1.10
: extend support for distinguished nameCompare Source
AttributeTypeAndValue({str: "/streetAddress=foo"})
AttributeTypeAndValue({str: "/2.5.4.9=foo"})
v10.1.9
: Add SubjectDirectoryAttributes extension supportCompare Source
SubjectDirectoryAttributes
such as gender, placeOfBirth et.al. for
SubjectDirectoryAttributes.
needed to be implemented in X509.js future.
v10.1.8
: KEYUTIL supports PKCS8 private key with extensionprivate key extsion and and issue #454 fixed.
v10.1.5
: CAdES-T support update and fixCompare Source
parseSignedDataForAddingUnsigned will not call it.
v10.1.4
: TSPParser.getPKIStatusInfo bugfixCompare Source
v10.1.3
: TSPParser.getPKIStatusInfo updateCompare Source
supports PKIFreeText and PKIFailureInfo
v10.1.2
: add SigningCertificateV2 for CMSParser and issue fixCompare Source
SigningCertificateV2
CMSParser.getCertificateSet
v10.1.1
: CMSSignedData and TimeStamp parser bugfixCompare Source
"serial" in TSTInfo class and TSPParser.getTSTInfo
method.
CMSParser.getAttributeList to align to the name
AttributeList class.
can be accepted by AttributeList constructor.
by getSignerInfo method was fixed.
v10.1.0
: add new CMSSignedData and TimeStamp parser and X500Name updateCompare Source
EContent,SignerInfos,SignerInfo,SignerIdentifier,
IssuerAndSerialNumber,AttributeArray,
Attribute,ESSCertID,IssuerSerial,CertificateSet}
SigningCertificate}
PKIStatusInfo}
because of X509.getX500Name update.
base64x,x509-ext,x509crl}.html
v10.0.5
: small issue fixes and updatesCompare Source
replace new Buffer() to Buffer.from() for
Node.JS deprecation (issue #460)
v10.0.4
: add methods to modify some extension parametersCompare Source
v10.0.3
: add findExt method in X509 classCompare Source
v10.0.2
: AdobeTimeStamp X.509v3 extension parser bugfixCompare Source
v10.0.1
: AdobeTimeStamp X.509v3 certificate extension addedCompare Source
v10.0.0
: Major update for CMS SigneData TimeStamp and CAdESCompare Source
to allow more simple ASN.1 generation
SignedData, Attribute
ContentType, SigningTime are also
updated.
PKIStatus, PKIFreeText, PKIFailureInfo,
TSPUtil.newTimeStampToken
SignatureTimeStamp, CompleteCertificateRefs,
OtherCertID, OtherHash
argument for explicit "tage" and implicit "tagi"
now accepts name and OID. method
setValueNameOrOid added.
X509 class constructor add support for
PEM or hex string of certificate as
argument.
OID added.
v9.1.9
: wrong encoding in CRLReason in OCSP CertStatus fixedCompare Source
v9.1.8
: wrong encoding in byKey of OCSP ResponderID fixedCompare Source
v9.1.7
: nextUpdate encoding bugfix in ocsp SingleResponseCompare Source
v9.1.6
: add OCSP response and request encoderCompare Source
isserNameHash, issuerKeyHash and serialNumber
without backward compatibility
v9.1.5
: ASN1HEX getChildIdx bug for too many childrenCompare Source
proper result when too many child items
such as over 200 children.
use getTLVblen instead.
v9.1.4
: X509CRL parser revokedCertificate bugfixX509CRL parser revokedCertificate bugfix
get{Idx,V,TLV}byListEx.
no revokedCertificates
missed to export X509CRL in npm package
v9.1.2
: add private extension support for Cert CRL and CSRCompare Source
in extension parser X509.getExtParam.
Thus certificate, CRL and CSR parser will
not raise error when undefined extension
is parsed.
private extension.
v9.1.1
: new CRL parser and private extension encoder supportCompare Source
not using X509.parseExt
v9.1.0
: new CRL APIs and other updatesCompare Source
class without backward compatibility.
missign SEQUENCE. (#448)
new KJUR.asn1.x509.Extension class.
been updated to align Certificate and
CertificationRequestInfo style in 9.0.0
without backward compatibility.
entry extension support in the future.
no more used in updated TBSCertList.
cRLNumber and cRLReason oids
was moved to new Extensions class.
asn1x509} updated to follow above updates.
v9.0.3
: TimeStampToken ASN.1 encoding error fixCompare Source
CMSVersion 3.
v9.0.2
: PolicyInformation named policy OID bug fixCompare Source
have not been accepted named policy OID such as "anyPolicy".
The issue was fixed.
v9.0.1
: TimeStampToken contentType attribute bug fixCompare Source
generated with wrong contentType attribute
with value "data". (#448)
contentType attribute with "tstinfo" for bugfix. (#448).
parameter can have "contentType" property additionaly
to set "tstinfo" as above.
added to OID.name2oidList.
v9.0.0
: Certificate and CSR generator and parser API major updatesCompare Source
https://github.com/kjur/jsrsasign/wiki/NOTE-jsrsasign-8.0.x-to-9.0.0-Certificate-and-CSR-API-migration-guide
backward compatibility so you may need to change your code
to upgrade jsrsasign 9.0.0.
extension class were changed without backward compatibility.
in X509 class as an parameter arguments.
generate TBSCertificate and sign by params argument.
So no need to call sign method or TBSCertificate
constructor.
among all certificate extension class.
of DistributionPoint and DistributionPointName
was changed.
JSON argument.
extended to support {type:"CN",value:"Test",ds:"prn"}
style JSON object.
align Certificate class and is deprecated.
was changed to accept by related class defined in asn1x509.js
without backward compatibility.
changed to have "hExtV" and "critical" as arguments.
getAlgorithmIdentifierName, getIssuer, getSubject,
getGeneralNames, getGeneralName, getDistributionPoint,
getDistributionPointName, getExtAuthorityInfoAccess,
getPolicyInformation, getPolicyQualifierInfo,
getUserNotice, getDisplayText, getX500NameRule,
getX500Name, getRDN, getAttrTypeAndValue, getParam,
getExtParamArray
getExtSubjectAltName2, getExtAIAInfo,
getExtCRLDistributionPointsURI.
Got error when cakey is PKCS#5 plain PEM key string
CertificationRequestInfo, CSRUtil.netCSRPEM without
backward compatibility.
as well as JSON parameter.
qunit-do-{asn1csr,asn1tsp,asn1x509-newcrt,asn1x509,base64x,
ecdsmod-s,keyutil-getpem,package-jwths,x509-ext,
x509-key,x509-kid,x509}.html
qunit-do-{asn1x509-tbscert,x509-param}.html
v8.0.24
: fix SigningCertificate v1 v2 attribute ASN.1 encodingCompare Source
wrong ASN.1 encoding issue was fixed (#448)
ASN.1 encoding issue fixed (#448)
v8.0.23
: add CertificatePolicies BMPString and VisibleString supportCompare Source
CertificatePolicies
NoticeReference and DisplayText class added
v8.0.22
: ASN1HEX and X509 class minior bug fixCompare Source
asn1x509 doesn't loaded
v8.0.21
: Donation program started, more RSA-PSS support and add ASN1HEX.get{Idx,TLV,V}byListExCompare Source
Please consider donation to sustain this project
https://github.com/kjur/jsrsasign#donations
X509 and newCertPEM
ASN1HEX.get{Idx,TLV,V}byListEx added
Its tutorial page will be provided by following URL near in future
https://github.com/kjur/jsrsasign/wiki/Tutorial-for-accessing-deep-inside-of-ASN.1-structure-by-using-new-ASN1HEX.getIdxbyListEx
RSA-PSS(SHA{,256,384,512}withRSAandMGF1) algorithms
RSA-PSS(SHA{,256,384,512}withRSAandMGF1) algorithms
specific tag
Please consider to move get{Idx,TLV,V}byListEx.
SHA{,256,384,512}withRSAandMGF1
SHAwithRSAandMGF1.
SHA{,256,384,512}withRSAandMGF1
v8.0.20
: add CSR support for subjectAltNameCompare Source
v8.0.19
: ECDSA signature validation maleability fix and othersCompare Source
JSRSASIGN SECURITY ADVISORY : 2020.06.22 CVE-2020-14966 ECDSA signature validation vulnerability by accepting wrong ASN.1 encoding
"/C=US/O=test" is "compat" format. So those methods
are added and existing method is now deprecated.
v8.0.18
: RSA decryption and RSA signature validation maleability fixCompare Source
JSRSASIGN SECURITY ADVISORY : 2020.06.22 CVE-2020-14967 RSA RSAES-PKCS1-v1_5 and RSA-OAEP decryption vulnerability with prepending zeros
v8.0.17
: RSAPSS verification maleability fix and othersCompare Source
JSRSASIGN SECURITY ADVISORY : 2020.06.22 CVE-2020-14968 RSA-PSS signature validation vulnerability by prepending zeros
v8.0.16
: extended Authority/SubjectKeyIdentifier supportCompare Source
by certificate or key
by certificate
by certificate or key
to set value by issuer or subject of certificate.
for certificate.
v8.0.15
: SHA384/512withECDSA wrong signature fix and add some curves supportCompare Source
wrong validation result issue was fixed (issue #394)
testcase added for SHA1/SHA384/SHA512 and
secp192k1/secp224r1
v8.0.14
: SubjectKeyIdentifier and KEYUTIL updateCompare Source
TBSCertificate.appendExtensionByName method
SubjectKeyIdentifier test added
such as EC PRIVATE KEY and EC PARAMETRS
pemtohex testcase added
plain PKCS#5 EC PRIVATE KEY testcase added
document fix (pull #356)
merged (pull #216)
merged for RegExp (pull #419)
merged for strict fix (pull #389)
document fix in return of decrypt method (issue #383)
onelineToLDAP sample added in document (issue #428)
v8.0.13
: mitigate minerva attackCompare Source
https://minerva.crocs.fi.muni.cz/
SECURITY ADVISORY
jsrsasign from 4.0.0 to 8.0.12 affects Minerva timing attack vulnerability.
https://minerva.crocs.fi.muni.cz/
by checking processing time of EC key generation or ECDSA signing.
private key value.
constant for key value in theory.
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.