Sablier

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

Replaced admin has access to previously created merkles

Summary

The admin address is set as sender when merklell and merkleLTs are created. In case of an admin change, the sender functions will no longer be available to the current admin, while being available to the previous admin. If the admin was changed

Vulnerability Details

When the merkles are created, the admin is set as sender both for the MerkleLL and MerkleLTs.

streamId = LOCKUP_LINEAR.createWithDurations(
LockupLinear.CreateWithDurations({
sender: admin,
recipient: recipient,
totalAmount: amount,
asset: ASSET,
cancelable: CANCELABLE,
transferable: TRANSFERABLE,
durations: streamDurations,
broker: Broker({ account: address(0), fee: ud(0) })
})
);
streamId = LOCKUP_TRANCHED.createWithDurations(
LockupTranched.CreateWithDurations({
sender: admin,
recipient: recipient,
totalAmount: amount,
asset: ASSET,
cancelable: CANCELABLE,
transferable: TRANSFERABLE,
tranches: tranches,
broker: Broker({ account: address(0), fee: ZERO })
})
);

The issue is that the admin can be changed, but this change is not reflected in the previously created merkles, as senders.

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 });
}

If the previous admin had to transfer ownership to protect the protocol from potential attackers (a last ditch method for instance), the merkles that the previous admin had created would still remain under his control and while the new admin has no access to it. The new admin for instance, cannot cancel or renounce the merkle streams.

Impact

New admin has no access to previously created merkles, while the previous admin does.

Tools Used

Manual review

Recommendations

Consider introducing an admin function to change senders, which can be called before ownership transfer.

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

0xnevi Judge
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
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.