Vulnerabilities |
3 via 3 paths |
---|---|
Dependencies |
16 |
Source |
npm |
Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: elliptic
- Introduced through: @0xcert/ethereum-utils@1.9.0
Detailed paths
-
Introduced through: @0xcert/ethereum-erc721@1.8.0 › @0xcert/ethereum-utils@1.9.0 › ethers@4.0.0-beta.1 › elliptic@6.3.3
Overview
elliptic is a Fast elliptic-curve cryptography in a plain javascript implementation.
Affected versions of this package are vulnerable to Cryptographic Issues. Elliptic allows ECDSA signature malleability via variations in encoding, leading \0
bytes, or integer overflows. This could conceivably have a security-relevant impact if an application relied on a single canonical signature.
PoC
var crypto = require('crypto')
var EC = require('elliptic').ec;
var ec = new EC('secp256k1');
var obj = require("./poc_ecdsa_secp256k1_sha256_test.json");
for (let testGroup of obj.testGroups) {
var key = ec.keyFromPublic(testGroup.key.uncompressed, 'hex');
for(let test of testGroup.tests) {
console.log("[*] Test " + test.tcId + " result: " + test.result)
msgHash = crypto.createHash('sha256').update(Buffer.from(test.msg, 'hex')).digest();
try {
result = key.verify(msgHash, Buffer.from(test.sig, 'hex'));
if (result == true) {
if (test.result == "valid" || test.result == "acceptable")
console.log("Result: PASS");
else
console.log("Result: FAIL")
}
if (result == false) {
if (test.result == "valid" || test.result == "acceptable")
console.log("Result: FAIL");
else
console.log("Result: PASS")
}
} catch (e) {
console.log("ERROR - VERIFY: " + e)
if (test.result == "valid" || test.result == "acceptable")
console.log("Result: FAIL");
else
console.log("Result: PASS")
}
}
}
Remediation
Upgrade elliptic
to version 6.5.3 or higher.
References
medium severity
- Vulnerable module: elliptic
- Introduced through: @0xcert/ethereum-utils@1.9.0
Detailed paths
-
Introduced through: @0xcert/ethereum-erc721@1.8.0 › @0xcert/ethereum-utils@1.9.0 › ethers@4.0.0-beta.1 › elliptic@6.3.3
Overview
elliptic is a Fast elliptic-curve cryptography in a plain javascript implementation.
Affected versions of this package are vulnerable to Cryptographic Issues via the secp256k1
implementation in elliptic/ec/key.js
. There is no check to confirm that the public key point passed into the derive function actually exists on the secp256k1
curve. This results in the potential for the private key used in this implementation to be revealed after a number of ECDH operations are performed.
Remediation
Upgrade elliptic
to version 6.5.4 or higher.
References
medium severity
- Vulnerable module: elliptic
- Introduced through: @0xcert/ethereum-utils@1.9.0
Detailed paths
-
Introduced through: @0xcert/ethereum-erc721@1.8.0 › @0xcert/ethereum-utils@1.9.0 › ethers@4.0.0-beta.1 › elliptic@6.3.3Remediation: Upgrade to @0xcert/ethereum-erc721@2.0.0.
Overview
elliptic is a Fast elliptic-curve cryptography in a plain javascript implementation.
Affected versions of this package are vulnerable to Timing Attack. Practical recovery of the long-term private key generated by the library is possible under certain conditions. Leakage of bit-length of a scalar during scalar multiplication is possible on an elliptic curve which might allow practical recovery of the long-term private key.
Remediation
Upgrade elliptic
to version 6.5.2 or higher.