The WithdrawalPool contains an optimization for managing withdrawal batches. The function updateWithdrawalBatchIdCutoff is responsible for updating the withdrawalBatchIdCutoff value. However, if a user has an incomplete withdrawal for a specific batch, this update cannot proceed until the user completes their withdrawal. A malicious user could exploit this situation to indefinitely prevent the update, leading to a denial-of-service (DoS) condition
Look at the following scenario:
A user submits a withdrawal request, which is assigned an ID of 130 and is associated with batch 35.
The withdrawalBatchIdCutoff remains at 35 until the user's withdrawal request is finalized.
If the withdrawal never completes, the getBatchIds function will iteratively process all batches for every withdrawal ID, potentially causing significant delays or halting other processes.
This vulnerability could allow a malicious user to block the withdrawal process for other users by preventing the system from advancing the withdrawalBatchIdCutoff. This can lead to a DoS attack where no new withdrawals can be processed until the malicious withdrawal is completed, affecting the overall availability of the system.
Manual review
To mitigate this issue, consider implementing a timeout or fallback mechanism where an admin can finalize or cancel old withdrawal requests after a certain period of inactivity.
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.