Lucene search

K
code423n4Code4renaCODE423N4:2023-09-MAIA-FINDINGS-ISSUES-818
HistoryOct 06, 2023 - 12:00 a.m.

payableCall in VirtualAccount isn’t protected by requiresApprovedCaller modifier

2023-10-0600:00:00
Code4rena
github.com
7
access control
vulnerability
settlement theft

AI Score

7.1

Confidence

Low

Lines of code
<https://github.com/code-423n4/2023-09-maia/blob/main/src/RootBridgeAgent.sol#L248&gt;

Vulnerability details

Impact

due to the lack of access control in payableCall function in VirtualAccount contract, anyone can call payableCall on a user virtual account . An attacker can use this vulnerability to steal the users funds after a failed settlement by the user .

Proof of Concept

  • User settlement transaction fails on destination chain for any reason .
  • Attacker front-runs user retrySettlement transaction by calling payableCall on the user virtual Account with target as RootBridgeAgentAddress and callData as retrySettlement selector and same settlement nonce as the user’s one and the recipient as his address on branch chain to bypass the caller check in retrySettlement .
  • the transaction succeed in the branch chain and the attacker receives the funds on the address he put on retrySettlement call .

Tools Used

Manual review

Recommended Mitigation Steps

Protect payableCall with requiresApprovedCaller modifier

Assessed type

Access Control


The text was updated successfully, but these errors were encountered:

All reactions

AI Score

7.1

Confidence

Low