CVE-2020-28498: Elliptic Elliptic Uses A Broken Or Vulnerability

MODERATE
Advisory Identifier: GHSA-r9p9-mrjm-926w
CVSS 6.8
CWE-327
Published
Advisory Summary

CVE-2020-28498 is a MODERATE (CVSS 6.8) elliptic uses a broken or vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Elliptic libraries in the npm ecosystem. The issue involves elliptic uses a broken or risky cryptographic algorithm. Remediation is available by upgrading affected packages to version 6.5.4.

CVE-2020-28498 at a Glance

CVE Identifier CVE-2020-28498
GHSA Identifier GHSA-r9p9-mrjm-926w
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Elliptic
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2020-28498

To remediate this vulnerability, upgrade all affected Elliptic dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

elliptic fixed: 6.5.4
npm install elliptic@6.5.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls elliptic

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2020-28498, inspect your project dependencies using npm:

npm ls elliptic

Analyze the terminal output to locate any version of Elliptic in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.5.4), your application is affected.

Note: The npm ls elliptic command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Elliptic, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The npm package `elliptic` before version 6.5.4 are vulnerable to Cryptographic Issues via the secp256k1 implementation in elliptic/ec/key.js. There is no check to confirm that the public key point passed into the derive function actually exists on the secp256k1 curve. This results in the potential for the private key used in this implementation to be revealed after a number of ECDH operations are performed.

CVE-2020-28498 Affected Elliptic Versions

1 component(s)
Fixed Versions:
6.5.4
Product / Package Ecosystem Affected Versions Fixed Version
elliptic
npm
< 6.5.4
6.5.4

References

Frequently Asked Questions

What is CVE-2020-28498?
CVE-2020-28498 is a security vulnerability in Elliptic involving Elliptic Uses a Broken or Risky Cryptographic Algorithm under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Elliptic versions are affected?
Affected versions include releases prior to 6.5.4 across affected packages: elliptic.
What version fixes CVE-2020-28498?
Upgrading to 6.5.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elliptic affected?
Yes, elliptic is affected in releases prior to 6.5.4. Upgrade your dependency to 6.5.4 or later.
What is the CVSS score of CVE-2020-28498?
CVE-2020-28498 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2020-28498?
CVE-2020-28498 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check npm dependencies for CVE-2020-28498?
Run the dependency tree command: 'npm ls elliptic'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r9p9-mrjm-926w",
  "modified" : "2023-09-06T23:43:30Z",
  "published" : "2021-03-08T16:06:50Z",
  "aliases" : [ "CVE-2020-28498" ],
  "summary" : "Elliptic Uses a Broken or Risky Cryptographic Algorithm",
  "details" : "The npm package `elliptic` before version 6.5.4 are vulnerable to Cryptographic Issues via the secp256k1 implementation in elliptic/ec/key.js. There is no check to confirm that the public key point passed into the derive function actually exists on the secp256k1 curve. This results in the potential for the private key used in this implementation to be revealed after a number of ECDH operations are performed.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "elliptic"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.5.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28498"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/indutny/elliptic/pull/244/commits"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/indutny/elliptic/commit/441b7428b0e8f6636c42118ad2aaa186d3c34c3f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/christianlundkvist/blog/blob/master/2020_05_26_secp256k1_twist_attacks/secp256k1_twist_attacks.md"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1069836"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-ELLIPTIC-1064899"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/elliptic"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-08T16:02:43Z",
    "nvd_published_at" : "2021-02-02T19:15:00Z"
  }
}