Sablier

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

Protocol withdraw function access-control is incorrect

Summary

Protocol withdraw function access-control is incorrect.

Vulnerability Details

According the sablier doc access-control when call withdraw action:

- Both the recipient and the NFT operator have the option to specify a custom address to withdraw the assets to.
- The sender, however, is limited to withdrawing assets directly to the recipient's address.

But the protocol don't implement the function correctly:

function withdraw(
uint256 streamId,
address to,
uint128 amount
) {
...
if (to != recipient && !_isCallerStreamRecipientOrApproved(streamId)) {
revert Errors.SablierV2Lockup_WithdrawalAddressNotRecipient(streamId, msg.sender, to);
}
...
}

When the msg.sender isn't sender, recipient or an approved operator, he also can withdraw the stream asset to recipient, which don't implement such function correctly.

Impact

Any users can withdraw the stream assets to recipient.

Tools Used

vscode, Manual Review

Recommendations

Limit only the sender can withdraw the stream to recipient.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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