Skip to main content
← All vulnerabilities
CVE-2024-48930GHSA-584Q-6J8J-R5PM

secp256k1-node vulnerable to private key extraction over ECDH

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.0.4, 3.8.1, 5.0.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • cryptocoinjs secp256k1-node

    From 4.0.0 · fixed in 4.0.4; fixed in 3.8.1

  • secp256k1npm

    From 5.0.0 · fixed in 5.0.1

  • secp256k1npm

    From 4.0.0 · fixed in 4.0.4

  • secp256k1npm

    fixed in 3.8.1

References 6

GitHub · cryptocoinjs/secp256k1-node