L1BossBridge::sendToL1 function should check if the signature has been used before to prevent a signature replay attack. A user can use the same sigature to withdraw multiple times and drain the token balance of L1 vault.
The sendToL1 function lacks signature validation, allowing a user that got a withdrawal request approved by a bridge operator use the signature multiple times to repeat the withdrawal.
Attacker: A user that deposited tokens to L2 and got a withdrawal request approved by a bridge operator. The user will use the same signature to repeat the withdrawal multiple times, potentially draining the protocol.
Victim: A user that deposits tokens to L2. The victim tokens will be stolen by the attacker withdrawing multiple times with the same signature.
Protocol: Boss Bridge protocol. L1BossBridge::sendToL1 function lacks signature validation, and any user with an approved withdrawal request can repeat the withdrawal multiple times.
Copy paste the testSignatureReplay() function into L1TokenBridge.t.sol::L1BossBridgeTest
Run forge test --mt testSignatureReplay -vv in the terminal
The deposited tokens are drained from the L1 vault.
Manual Review
Consider using a nonce value and a mapping to register executed transactions.
Add a mapping to register the executed transactions.
Add a nonce to the withdrawTokensToL1() function parameters.
Change sendToL1() function visibility to internal and check if the message has been executed.
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.