20,000 USDC
View results
Submission Details
Severity: medium
Valid

Single-step ownership transfer pattern is dangerous

Summary

In utils the ownable.sol file is using the single-step ownership transfer pattern.

Vulnerability Details

Inheriting Ownable contract means you are using a single-step ownership transfer pattern. If an admin provides an incorrect address for the new owner this will result in none of the onlyOwner marked methods being callable again. The better way to do this is to use a two-step ownership transfer approach, where the new owner should first claim its new rights before they are transferred.

Impact

1.If an admin provides an incorrect address for the new owner this will result in none of the onlyOwner marked methods being callable again.
2.Funds gets stuck permanently.

Tools Used

Manual

Recommendations

Add AcceptOwnership method so that firstly the new owner claims the rights and after that old owner gets unauthorized.

Take refrence form openzeppelin Ownable2step contract:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.