An attacker can exploit the lack of collection removal mechanism to indefinitely increase the _collection array size, leading to out-of-gas errors and denial of service.
The attacker initiates multiple withdrawals from L2 to L1 with arbitrary L2 collections when white_list_enabled is false.
Each withdrawal creates a new collection on L1, increasing the _collection array.
There's no mechanism to remove collections from _collection.
The getWhiteListedCollections function iterates over the entire _collection array.
The withdrawTokens function become unusable due to out-of-gas errors.
The getWhiteListedCollections function fail, breaking dependent functionalities.
Forced whitelisting of collections, compromising the protocol's security model.
Manual review
Implement a mechanism to remove unused collections from _collection.
Add a limit to the number of collections that can be added in a given time frame.
Implement pagination for getWhiteListedCollections to avoid gas limit issues.
Likelyhood: High, once the whitelist option is disabled, collections will grow. Impact: High, withdraw won’t be possible because of Out-Of-Gas.
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.