Vulnerability · Published Oct 21, 2024 · Assigned by GitHub_M

CVE-2024-48930secp256k1-node vulnerable to private key extraction over ECDH

High 8.7

In plain English

A high-severity security flaw in secp256k1-node from cryptocoinjs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)8.7High
Exploit odds (30 days)0.4%top 64.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

secp256k1-node is a Node.js binding for an Optimized C library for EC operations on curve secp256k1. In `elliptic`-based version, `loadUncompressedPublicKey` has a check that the public key is on the curve. Prior to versions 5.0.1, 4.0.4, and 3.8.1, however, `loadCompressedPublicKey` is missing that check. That allows the attacker to use public keys on low-cardinality curves to extract enough information to fully restore the private key from as little as 11 ECDH sessions, and very cheaply on compute power. Other operations on public keys are also affected, including e.g. `publicKeyVerify()` incorrectly returning `true` on those invalid keys, and e.g. `publicKeyTweakMul()` also returning predictable outcomes allowing to restore the tweak. Versions 5.0.1, 4.0.4, and 3.8.1 contain a fix for the issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmsecp256k15.0.1GHSA-584q-6j8j-r5pm
npmsecp256k14.0.4GHSA-584q-6j8j-r5pm
npmsecp256k13.8.1GHSA-584q-6j8j-r5pm

Affected products (as reported)

VendorProductVersions
cryptocoinjs secp256k1-node = 5.0.0>= 4.0.0, < 4.0.4< 3.8.1

Weakness: CWE-354 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

References