Description:
In the escrow_deposit_tokens
function, tokens are transferred using the transfer_from
method. If the contract interacting with this function has a custom onERC721Received
function, it could reenter the function and cause unexpected behaviours.
Location: escrow_deposit_tokens
function in blockchain/starknet/src/bridge.cairo
line 402 -Add a reentrancy guard in the escrow_deposit_tokens
function.
Issue:
The function does not protect against reentrancy attacks, which could allow an attacker to reenter the contract and manipulate state or perform multiple token transfers.
Impact:
A reentrancy attack could lead to unauthorized withdrawals or duplication of tokens, causing significant financial losses.
Tools used: Manual Review.
Recommendations:
Implement a reentrancy guard using a flag or a mutex-like mechanism to prevent reentrant calls.
Potential changes:
Add a reentrancy guard to the escrow_deposit_tokens
function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.