CVE-2020-5232: @ensdomains/ens Malicious Takeover Of Previously Owned Vulnerability

HIGH
Advisory Identifier: GHSA-8f9f-pc5v-9r5h
CVSS 8.7
CWE-285
Published
Advisory Summary

CVE-2020-5232 is a HIGH (CVSS 8.7) malicious takeover of previously owned vulnerability (CWE-285: Improper Authorization) affecting @ensdomains/ens libraries in the npm ecosystem. The issue involves malicious takeover of previously owned ens names. Remediation is available by upgrading affected packages to version 0.4.0.

CVE-2020-5232 at a Glance

CVE Identifier CVE-2020-5232
GHSA Identifier GHSA-8f9f-pc5v-9r5h
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-285: Improper Authorization
Affected Product @ensdomains/ens
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.7

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

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

How to Fix CVE-2020-5232

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

@ensdomains/ens fixed: 0.4.0
npm install @ensdomains/ens@0.4.0
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 @ensdomains/ens

How to Check if You Are Affected

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

npm ls @ensdomains/ens

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

Note: The npm ls @ensdomains/ens 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In @ensdomains/ens, 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

### Impact A user who owns an ENS domain can set a "trapdoor", allowing them to transfer ownership to another user, and later regain ownership without the new owner's consent or awareness. ### Patches A new ENS deployment is being rolled out that fixes this vulnerability in the ENS registry. The registry is newly deployed at [0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e](https://etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e). ### Workarounds Do not accept transfers of ENS domains from other users on the old registrar.

CVE-2020-5232 Affected @ensdomains/ens Versions

1 component(s)
Fixed Versions:
0.4.0
Product / Package Ecosystem Affected Versions Fixed Version
@ensdomains/ens
npm
< 0.4.0
0.4.0

References

Frequently Asked Questions

What is CVE-2020-5232?
CVE-2020-5232 is a security vulnerability in @ensdomains/ens involving Malicious takeover of previously owned ENS names under CWE-285: Improper Authorization.
Which @ensdomains/ens versions are affected?
Affected versions include releases prior to 0.4.0 across affected packages: @ensdomains/ens.
What version fixes CVE-2020-5232?
Upgrading to 0.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @ensdomains/ens affected?
Yes, @ensdomains/ens is affected in releases prior to 0.4.0. Upgrade your dependency to 0.4.0 or later.
What is the CVSS score of CVE-2020-5232?
CVE-2020-5232 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-5232?
CVE-2020-5232 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check npm dependencies for CVE-2020-5232?
Run the dependency tree command: 'npm ls @ensdomains/ens'. 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-8f9f-pc5v-9r5h",
  "modified" : "2022-09-21T19:32:10Z",
  "published" : "2020-01-30T23:55:04Z",
  "aliases" : [ "CVE-2020-5232" ],
  "summary" : "Malicious takeover of previously owned ENS names",
  "details" : "### Impact\nA user who owns an ENS domain can set a \"trapdoor\", allowing them to transfer ownership to another user, and later regain ownership without the new owner's consent or awareness.\n\n### Patches\n\nA new ENS deployment is being rolled out that fixes this vulnerability in the ENS registry. The registry is newly deployed at [0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e](https://etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e).\n\n### Workarounds\nDo not accept transfers of ENS domains from other users on the old registrar.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ensdomains/ens"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ensdomains/ens/security/advisories/GHSA-8f9f-pc5v-9r5h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5232"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ensdomains/ens/commit/36e10e71fcddcade88646821e0a57cc6c19e1ecf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-01-30T23:54:51Z",
    "nvd_published_at" : "2020-01-31T00:15:00Z"
  }
}