@ensdomains/ens-contracts@0.0.5 vulnerabilities

ENS contracts

  • latest version

    1.5.2

  • latest non vulnerable version

  • first published

    4 years ago

  • latest version published

    24 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @ensdomains/ens-contracts package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Integer Overflow or Wraparound

    @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
    

    How to fix Integer Overflow or Wraparound?

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

    <0.0.22