The contract is designed to distribute tokens to specific addresses that are part of the Merkle tree, with the expectation that users will claim their own tokens when they choose to do so.
The function accepts an account parameter but never validates that msg.sender == account, allowing anyone who obtains a valid Merkle proof to claim tokens for any other address without permission.
Likelihood:
The account parameter being separate from msg.sender creates an obvious attack vector that any observer can exploit
All necessary claim data (proofs, amounts) becomes publicly visible on-chain through transaction data and emitted events, making it trivial to claim on behalf of others
Impact:
Users lose control over when they claim their tokens, which can have significant financial and tax consequences depending on jurisdiction and token price fluctuations at claim time
The msg.sender pays the fee while another address receives the tokens, enabling griefing attacks where malicious actors force unwanted claims on victims
The following test demonstrates how any address can claim tokens on behalf of another user without their permission:
Explanation: Bob successfully claims tokens for Alice without her consent. The contract never validates that msg.sender == account, allowing anyone to force claims on behalf of others. This removes user autonomy over claim timing and enables griefing attacks.
Add an authorization check to ensure only the intended recipient can claim their tokens:
Explanation: Adding msg.sender != account check ensures only the rightful owner can execute their claim. This preserves user autonomy and prevents griefing attacks. The check is placed early to fail fast and save gas on unauthorized attempts.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.