If a malicious actor can call initialize with incorrect addresses, the contract could be directed to send messages to malicious addresses, resulting in token loss or incorrect operations.
The initialize function does not validate critical parameters like starknetCoreAddress, starklaneL2Address, and starklaneL2Selector. This can lead to the contract being initialized with malicious or incorrect addresses, compromising its integrity.
Losses could include the entire amount of tokens handled by the bridge if the bridge is pointed to a malicious contract.
PoC
Step 1: A malicious actor calls the initialize function with arbitrary or malicious addresses.
Step 2: The contract stores these addresses without validation.
Step 3: All future interactions with the StarkNet bridge could be compromised, leading to potential loss of user funds or the contract being redirected to a malicious entity.
CODE SNIPPET
Manual review
Add validation checks to ensure that the provided addresses are legitimate and belong to trusted contracts.
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.