MerkleAirdrop::claim
does not track and check whether eligible users have already claimed their share of the airdrop. Consequently, eligible users can claim multiple times.
MerkleAirdrop::claim
is supposed to enable airdrop-eligible users to claim their share of the airdrop. However, the function does not track and check whether eligible users have already claimed or not. As demonstrated by the test below, this is a vulnerability that can be exploited by eligible users to claim more than their share of the airdrop via submitting multiple claim transactions:
By repeatedly calling MerkleAirdrop::claim
, airdrop-eligible users can claim more than they are eligible for. Essentially, a malicious airdrop-eligible user can
claim the airdrop shares intended for other eligible users who have not claimed yet,
drain the USDC balance of MerkleAirdrop
until its balance has at least one share of airdrop amount left.
Manual review, Foundry.
Track and check which users have already claimed their share of the airdrop. Perform the following modifications in MerkleAirdrop
:
Note that due to another bug reported in another finding, the modified eligibility check above is this incomplete/incorrect. Taking into account both bugs, a full fix would look like as follows:
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.