The getMessageHash
function currently constructs the EIP-712 message hash using only the receiver's address and the amount of tokens.
It does not include any form of replay protection parameters such as a nonce, contract address, or expiry time.
As a result, a valid signature signed by a user can be reused multiple times by anyone else to claim NFTs on behalf of the user, enabling replay attacks.
Likelihood:
Any attacker observing a valid signature from a user can reuse the signature multiple times to claim NFTs on the user's behalf.
This can happen anytime a user signs the message and shares the signature externally or via the transaction itself.
Impact:
Unauthorized repeated claims of Snowman NFTs for the same user, leading to token distribution abuse.
Users lose control over their claim signatures and cannot revoke or invalidate them.
Add a nonce parameter to the SnowmanClaim
struct:
Add a mapping(address => uint256) private s_nonces; to track the nonce for each user.
Include the nonce in the message hash calculation:
After each successful claim, increment the nonce to prevent signature reuse:
The claim function of the Snowman Airdrop contract doesn't check that a recipient has already claimed a Snowman. This poses no significant risk as is as farming period must have been long concluded before snapshot, creation of merkle script, and finally claiming.
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.