VDB
Sign up
MEDIUM4.8

GHSA-fc9h-whq2-v747

Valid ECDSA signatures erroneously rejected in Elliptic

Quick fix

GHSA-fc9h-whq2-v747 — elliptic: upgrade to the fixed version with the command below.

npm install elliptic@6.6.0

Details

The Elliptic prior to 6.6.0 for Node.js, in its for ECDSA implementation, does not correctly verify valid signatures if the hash contains at least four leading 0 bytes and when the order of the elliptic curve's base point is smaller than the hash, because of an _truncateToN anomaly. This leads to valid signatures being rejected. Legitimate transactions or communications may be incorrectly flagged as invalid.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/elliptic
Introduced in: 0Fixed in: 6.6.0
Fixnpm install elliptic@6.6.0

References