The function sendToL1
in L1BossBridge is declared as public
and can take arbitrary values allowing a malicious strategist to break the protocol.
sendToL1
performs a low-level call with arbitrary target and calldata, a hacker can prepare a payload to instruct the bridge to call the vault contract and instruct it to transfer ownership to the hacker. After claiming ownership the hacker can execute approveTo
in the vault contract to gain control over the entire balance and drain it.
The follow code snippet shows the attack.
Vault compromised and drained. Protocol broken.
VS Code and Foundry.
Add an access control check in sendToL1
to only allow the owner of the bridge to handle the 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.