Users can force the execution of some functions on behalf of other users
Proof of Concept
redeemDeposit() becomes available in BranchBridgeAgent when execution has failed from Branch to Root in order for the user to collect the deposited tokens. The problem is that there is no access control and anyone can call redeemDeposit() for any deposit nonce, a user might not want to redeem a deposit and instead retry-it. Similarly retrieveDeposit & retrySettlement also lack access control. These functions should be available only to the depositor.
Tools used
Manual Inspection
Mitigation
Add access control checks to the mentioned functions
Lines of code
https://github.com/code-423n4/2023-05-maia/blob/54a45beb1428d85999da3f721f923cbf36ee3d35/src/ulysses-omnichain/BranchBridgeAgent.sol#L433-L439 https://github.com/code-423n4/2023-05-maia/blob/54a45beb1428d85999da3f721f923cbf36ee3d35/src/ulysses-omnichain/BranchBridgeAgent.sol#L450-L456 https://github.com/code-423n4/2023-05-maia/blob/54a45beb1428d85999da3f721f923cbf36ee3d35/src/ulysses-omnichain/BranchBridgeAgent.sol#L418-L430
Vulnerability details
Impact
Users can force the execution of some functions on behalf of other users
Proof of Concept
redeemDeposit()
becomes available inBranchBridgeAgent
when execution has failed from Branch to Root in order for the user to collect the deposited tokens. The problem is that there is no access control and anyone can callredeemDeposit()
for any deposit nonce, a user might not want to redeem a deposit and instead retry-it. SimilarlyretrieveDeposit
&retrySettlement
also lack access control. These functions should be available only to the depositor.Tools used
Manual Inspection
Mitigation
Add access control checks to the mentioned functions
Assessed type
Access Control