Sablier

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

Retained Admin Privileges Allow Previous Admin to Cancel Streams on `SablierV2MerkleLockup` contracts

Summary

The SablierV2MerkleLL and SablierV2MerkleLT contracts inherit from SablierV2MerkleLockup, which is Adminable

abstract contract SablierV2MerkleLockup is
ISablierV2MerkleLockup, // 2 inherited component
@> Adminable // 1 inherited component
contract SablierV2MerkleLL is
ISablierV2MerkleLL, // 2 inherited components
@> SablierV2MerkleLockup // 4 inherited components
contract SablierV2MerkleLT is
ISablierV2MerkleLT, // 2 inherited components
@> SablierV2MerkleLockup // 4 inherited components

The Adminable contract has a transferAdmin function, but it does not update the admins of the SablierV2Lockup streams created from SablierV2MerkleLockup because the admin (sender)` of these streams is immutable.

Vulnerability Details

When a protocol uses the SablierV2MerkleLockup contracts to create an airstream, the admin is initially assigned the admin role. However, the current (usually first) admin is also set as the sender in the SablierV2Lockup contract, granting them rights to the SablierV2Lockup::cancel function (if cancalable) and other "admin-only" functions.

Impact

If the protocol admin's private key is compromised, or any other issue arises, using the Adminable::transferAdmin function to transfer admin rights will only change the admin role on the SablierV2MerkleLockup contracts. The previous admin will still retain the ability to cancel all streams and retrieve all refunded amounts on the SablierV2Lockup contract. This is because the admin (sender) of the streams remains immutable, allowing the previous admin to exploit their retained privileges.

Tools Used

Manual Review

Recommendations

  1. Implement a mechanism to update the admin of all streams when using the Adminable::transferAdmin function on SablierV2MerkleLockup.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Admin changing functionality allows former admin access and does not give new admin access to some functionality

Support

FAQs

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