The vulnerability identified relates to the sendToL1
function in the L1BossBridge
contract and its interaction with the vault.approveTo(address(this), type(uint256).max)
call from the L1Vault
contract. The sendToL1
function lacks proper access control, and coupled with the unrestricted approval granted to L1BossBridge
by the L1Vault
, it creates a significant security risk.
This issue arises because sendToL1
can execute arbitrary calls, including sensitive functions like transferOwnership()
or transferFrom()
, on behalf of the L1Vault
. The unrestricted approval (type(uint256).max
) means that any token amount can be transferred. Without specific access controls on sendToL1
, a malicious actor could craft a message that misuses these capabilities to seize control of the L1Vault
or to transfer all tokens from the vault, effectively draining it.
The impact of this vulnerability is extremely high, as it directly jeopardizes the security of the assets within the L1Vault
. Malicious actors can exploit this vulnerability to gain unauthorized control or transfer out all the tokens, leading to a total loss of funds stored in the vault. Such an exploit would severely undermine the trust and integrity of the entire system.
To address this vulnerability, it's crucial to implement robust access control on the sendToL1
function. Specifically, it is advisable to:
Restrict the types of calls and targets that can be made through sendToL1
. This could involve maintaining a whitelist of allowable functions or contracts that can be interacted with.
Implement role-based access control (RBAC) using mechanisms such as OpenZeppelin's AccessControl
to enforce more granular permissions on who can call sendToL1
.
Reconsider the necessity of granting unlimited approval (type(uint256).max
) from L1Vault
to L1BossBridge
. Instead, adopt a more conservative approval strategy, as previously recommended for mitigating the ERC20 Contract Approval vulnerability.
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.