Skip to content

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

HighCVSS 8.7 EPSS 0.41%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial

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.

Upgrade path

3 packages: 2 fixed.

PackageAffectedFixed inStatus
npm secp256k1(npm) < 3.8.1; <= 3.8.0; = 5.0.0; >= 4.0.0, < 4.0.4 +1 more 3.8.1, 4.0.4, 5.0.1 Fixed
secp256k1-node project secp256k1-node < 3.8.1; = 5.0.0; >= 4.0.0, < 4.0.4 3.8.1, 4.0.4 Fixed
cryptocoinjs secp256k1-node = < 3.8.1; = = 5.0.0; = >= 4.0.0, < 4.0.4 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm secp256k1(npm) = 5.0.0 No fix listed
npm secp256k1(npm) >= 4.0.0, < 4.0.4 4.0.4
npm secp256k1(npm) <= 3.8.0 No fix listed
cryptocoinjs secp256k1-node = = 5.0.0 No fix listed
cryptocoinjs secp256k1-node = >= 4.0.0, < 4.0.4 No fix listed
cryptocoinjs secp256k1-node = < 3.8.1 No fix listed
secp256k1-node project secp256k1-node = 5.0.0 No fix listed
secp256k1-node project secp256k1-node >= 4.0.0, < 4.0.4 4.0.4
secp256k1-node project secp256k1-node < 3.8.1 3.8.1
npm secp256k1(npm) >= 5.0.0, < 5.0.1 5.0.1
npm secp256k1(npm) < 3.8.1 3.8.1

References