Integer Overflow or Wraparound Affecting @ensdomains/ens-contracts package, versions <0.0.22


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.07% (30th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-ENSDOMAINSENSCONTRACTS-5813754
  • published 2 Aug 2023
  • disclosed 1 Aug 2023
  • credit Unknown

How to fix?

Upgrade @ensdomains/ens-contracts to version 0.0.22 or higher.

Overview

@ensdomains/ens-contracts is an ENS contracts

Affected versions of this package are vulnerable to Integer Overflow or Wraparound. According to the documentation, controllers are allowed to register new domains and extend the expiry of existing domains, but they cannot change the ownership or reduce the expiration time of existing domains. However, a preliminary analysis suggests that an attacker-controlled controller may be able to reduce the expiration time of existing domains due to an integer overflow in the renew function.

The vulnerable line of code is:

require(
            expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD
        ); // Prevent future overflow

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
4.9 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    High
  • Availability (A)
    None
Expand this section

NVD

6.5 medium