The smart contract under review is susceptible to a front-run attack when the implementation is changed.
specifically, during the process of changing the implementation contract, the initialize function becomes
accessible to anyone, creating a critical vulnerability.
When the admin changes the implementation of the contract, the initialize function, which should only be callable by the owner,
becomes exposed. In the event of a front-run attack, a malicious actor can monitor mempool for the implementation change
transaction and call the initialize function within the same block. This would allow the attacker to execute arbitrary code or
reconfigure the contract before the intended administrator can secure the contract by properly initializing it.
POC:
The potential impact of this vulnerability is severe:
An attacker can take control of the bridge contract and abuse the protocol.
Users will lost their assets.
To mitigate this vulnerability, it is essential to implement the following measures:
Ensure that the initialize function can only be called by the owner (or a designated administrator) by adding an onlyOwner modifier
to the function. This will prevent unauthorized entities from invoking this function.
If frontrun at the first deployment, protocol will deploy again, no real impact: informational. Moreover it is already deployed and initialize on mainnet. For the upgrades, `initialize` can/will change for the next update since the owner is already set. A lot of protocol make that change. That’s why I consider it like a future feature and it is out of scope.
If frontrun at the first deployment, protocol will deploy again, no real impact: informational. Moreover it is already deployed and initialize on mainnet. For the upgrades, `initialize` can/will change for the next update since the owner is already set. A lot of protocol make that change. That’s why I consider it like a future feature and it is out of scope.
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.