CVE-2020-13822: Elliptic Signature Malleabillity Vulnerability

HIGH
Advisory Identifier: GHSA-vh7m-p724-62c2
CVSS 7.7
CWE-190
Published
Advisory Summary

CVE-2020-13822 is a HIGH (CVSS 7.7) signature malleabillity vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Elliptic libraries in the npm ecosystem. The issue involves signature malleabillity in elliptic. Remediation is available by upgrading affected packages to version 6.5.3.

CVE-2020-13822 at a Glance

CVE Identifier CVE-2020-13822
GHSA Identifier GHSA-vh7m-p724-62c2
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-190: Integer Overflow or Wraparound
Affected Product Elliptic
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

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:U/C:H/I:H/A:L).

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

How to Fix CVE-2020-13822

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.3
npm install elliptic@6.5.3
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-13822, 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.3), 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-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. 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 Elliptic package before version 6.5.3 for Node.js allows ECDSA signature malleability via variations in encoding, leading '\0' bytes, or integer overflows. This could conceivably have a security-relevant impact if an application relied on a single canonical signature.

CVE-2020-13822 Affected Elliptic Versions

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

References

Frequently Asked Questions

What is CVE-2020-13822?
CVE-2020-13822 is a security vulnerability in Elliptic involving Signature Malleabillity in elliptic under CWE-190: Integer Overflow or Wraparound.
Which Elliptic versions are affected?
Affected versions include releases prior to 6.5.3 across affected packages: elliptic.
What version fixes CVE-2020-13822?
Upgrading to 6.5.3 (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.3. Upgrade your dependency to 6.5.3 or later.
What is the CVSS score of CVE-2020-13822?
CVE-2020-13822 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2020-13822?
CVE-2020-13822 is classified under CWE-190: Integer Overflow or Wraparound (The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.).
How can I check npm dependencies for CVE-2020-13822?
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-vh7m-p724-62c2",
  "modified" : "2024-10-16T17:02:45Z",
  "published" : "2020-07-29T20:40:35Z",
  "aliases" : [ "CVE-2020-13822" ],
  "summary" : "Signature Malleabillity in elliptic",
  "details" : "The Elliptic package before version 6.5.3 for Node.js allows ECDSA signature malleability via variations in encoding, leading '\\0' bytes, or integer overflows. This could conceivably have a security-relevant impact if an application relied on a single canonical signature.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "elliptic"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.5.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-13822"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/indutny/elliptic/issues/226"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/indutny/elliptic/commit/856fe4d99fe7b6200556e6400b3bf585b1721bec"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/indutny/elliptic"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/%40herman_10687/malleability-attack-why-it-matters-7b5f59fb99a4"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/@herman_10687/malleability-attack-why-it-matters-7b5f59fb99a4"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/elliptic"
  }, {
    "type" : "WEB",
    "url" : "https://yondon.blog/2019/01/01/how-not-to-use-ecdsa"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-190" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-07-29T20:39:31Z",
    "nvd_published_at" : "2020-06-04T15:15:13Z"
  }
}