Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

`Adminable.sol::transferAdmin` uses incorrect Transfer Admin Pattern

Summary

https://github.com/Cyfrin/2024-05-Sablier/blob/43d7e752a68bba2a1d73d3d6466c3059079ed0c6/v2-core/src/abstracts/Adminable.sol#L34-L40

Vulnerability Details

`function transferAdmin(address newAdmin) public virtual override onlyAdmin {
    // Effect: update the admin.
    admin = newAdmin;


    // Log the transfer of the admin.
    emit IAdminable.TransferAdmin({ oldAdmin: msg.sender, newAdmin: newAdmin });
}`

The current admin transfer pattern is calling transferAdmin() function with an address type argument, which is immediately set to the new admin of the contract. If the new address of the new admin is actually not a valid account then the admin just got transferred to an uncontrolled account, breaking all functions that can be called only by admin.

Impact

this can impact availability of the protocol since incorrect admin or loss of admin(zero-address) can occur

Tools Used

Manual Review

Recommendations

Implement a two-step process where the admin nominates an account and the nominated account needs to call an acceptAdmin() function for the transfer of admin to be completed. This ensures the nominated account is a valid & active one.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid as per Docs

https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

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