Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. secp256k1
  4. ›
  5. CVE-2024-48930

CVE-2024-48930: secp256k1-node allows private key extraction over ECDH

October 21, 2024

In elliptic-based version, loadUncompressedPublicKey has a check that the public key is on the curve: https://github.com/cryptocoinjs/secp256k1-node/blob/6d3474b81d073cc9c8cc8cfadb580c84f8df5248/lib/elliptic.js#L37-L39

loadCompressedPublicKey is, however, missing that check: https://github.com/cryptocoinjs/secp256k1-node/blob/6d3474b81d073cc9c8cc8cfadb580c84f8df5248/lib/elliptic.js#L17-L19

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

References

  • github.com/advisories/GHSA-584q-6j8j-r5pm
  • github.com/cryptocoinjs/secp256k1-node
  • github.com/cryptocoinjs/secp256k1-node/commit/9a15fff274f83a6ec7f675f1121babcc0c42292f
  • github.com/cryptocoinjs/secp256k1-node/security/advisories/GHSA-584q-6j8j-r5pm
  • nvd.nist.gov/vuln/detail/CVE-2024-48930

Code Behaviors & Features

Detect and mitigate CVE-2024-48930 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.8.1, all versions starting from 4.0.0 before 4.0.4, all versions starting from 5.0.0 before 5.0.1, version 5.0.0

Fixed versions

  • 5.0.1
  • 4.0.4
  • 3.8.1

Solution

Upgrade to versions 3.8.1, 4.0.4, 5.0.1 or above.

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

npm/secp256k1/CVE-2024-48930.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:49 +0000.