The automatic whitelisting of new collections on L2 during withdrawals can be exploited to bloat the whitelist, potentially leading to increased gas costs and partial DOS.
In withdraw_auto_from_l1
, new collections are automatically whitelisted, trough ensure_erc721_deployment
:
An attacker can repeatedly initiate withdrawals with new collection addresses, bloating the whitelist.
Increased gas costs for operations that iterate over the whitelist.
Partial DOS of functions that rely on whitelist iterations.
Manual review
Implement a process for adding new collections to the whitelist instead of automatic addition.
Add a limit to the number of collections that can be whitelisted in a given time frame.
Implement a mechanism to remove or deprecate unused whitelisted collections.
Consider implementing a more gas-efficient data structure for managing the whitelist.
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.