Submitted by p4y4b13
https://github.com/code-423n4/2025-01-initia-move/blob/a96f5136c4808f6968564a4592fe2d6ac243a233/usernames-module/sources/name_service.move#L458
The name_service.move module allows users to register domain names. If anyone wants to register an already purchased domain, they can only do so once the expiration_date + grace_period for that domain has passed. The name_service.move module allows anyone to call extend_expiration for any domain, which is a feature (according to sponsors).
The main issue is that the extend_expiration() function allows users to extend the expiration of a domain even after the grace period has ended, which is unintended behavior.
As a result, users, multi-sig owners of the actual domain name, or attackers can frontrun and attempt to call extend_expiration() after the grace period has ended, even if other users are trying to buy the same domain name using register_domain().
This breaks a key invariant of the protocol, leading to genuine users being negatively impacted and experiencing a poor user experience.
Consider the following attack scenario:
To mitigate this issue, prevent the extend_expiration() function from being called for domains after the completion of expiration_date + grace_period.
andrew (Initia) confirmed and commented:
