In L1BossBridge::sendToL1 the v,r, and s values of the operators' signatures are passed and the signature is resconstructed. There is no check as to whether the signature has already been used meaning that an attacker can replay the signature and withdraw the entire contract balance.
In L1BossBridge::sendToL1 on lines 112-125, the v,r, and s values of the operator's signature are passed to the function and the signer is recovered:
There is no check, such as the use of a nonce, for whether the signature has already been used. This means that an attacker can re-use the same signature and replay the transaction until the entire vault balance has been withdrawn to their attacking address.
Since the entire funds can be drained from the vault, users' deposits are at risk and this is a likely exploit, this is a high-severity finding.
The following test shows that if the vault has an initial balance, assuming that the attacker has successfully deposited on the L2 with an amount equal to amount2 so that the operator will sign the message, an attacker can reuse a signature until the entire vault balance has been drained.
The test passes, demonstrating that the balance of the vault is 0 and has been drained of all funds.
Add a nonce to the L1BossBridge::withdrawTokensToL1 and L1BossBridge::sendToL1 functions to ensure that a signature can only be used once.
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.