Integer Overflow or Wraparound Affecting @ensdomains/ens-contracts package, versions <0.0.22
Threat Intelligence
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
Introduced: 1 Aug 2023
CVE-2023-38698 Open this link in a new tabHow 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