Lack of Two-Step Process for Critical Operations #68
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
invalid
This doesn't seem right
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-06-illuminate/blob/main/marketplace/MarketPlace.sol#L109-L112
https://github.com/code-423n4/2022-06-illuminate/blob/main/lender/Lender.sol#L129-L131
https://github.com/code-423n4/2022-06-illuminate/blob/main/redeemer/Redeemer.sol#L62-L65
Vulnerability details
Impact
This function transfers the ownership of the contract in a single step. There is no way to reverse a one-step transfer of ownership to an address without an owner. This would not be the case if ownership were transferred through a two-step process in which an owner proposed a transfer and the prospective recipient accepted it.
Proof of Concept
Alice wants to transfer ownership of
contract.sol
to a new wallet address. Alice executessetAdmin()
function to the wrong address. Not double checking it before, Alice has now set the owner to the wrong address and now this cannot be undone. Alice is locked out of the ability to execute all criticalauthorized(admin)
functions.Tools Used
Manual Review
Recommended Mitigation Steps
Use a two-step process for ownership transfers.
The text was updated successfully, but these errors were encountered: