The on-chain contract correctly verifies that a claimant's leaf is part of the Merkle tree. However, it blindly trusts the amount contained within that leaf. The contract has no independent, on-chain knowledge of the correct allocation amount, making it vulnerable to flawed or manipulated data that originates from the off-chain Merkle tree generation scripts.
Normal Behavior: The off-chain scripts generate a Merkle tree where each leaf is a hash of (address, correct_amount). A user provides their amount and a proof, and the contract verifies that the resulting leaf is in the tree before minting.
The Issue: The entire security of the distribution amounts rests on the off-chain generation script being bug-free and the input data being pristine. If a bug or a malicious edit introduces a leaf with an inflated amount (e.g., (attacker_address, 1,000,000e18)), the contract will successfully verify the proof for this leaf and mint the inflated amount, as it has no mechanism to know the amount is wrong.
Likelihood:
When a bug exists in the off-chain tree generation scripts (GenerateInput.s.sol, SnowMerkle.s.sol).
When the input.json file is maliciously altered before the Merkle root is generated and set.
Impact:
An attacker or bugged address can drain a disproportionate share of the airdrop.
The total planned airdrop supply can be exceeded, breaking the tokenomics.
An attacker (or a script bug) modifies the input.json file to assign themselves a massive allocation. They then run the project's own GenerateInput.s.sol and SnowMerkle.s.sol scripts to generate a new Merkle root and a proof that corresponds to their malicious leaf. If the project owner sets this new, malicious root, the attacker can call claim with the inflated amount. The MerkleProof.verify call will return true, and the contract will proceed to mint an illegitimate number of tokens.
The contract's design must be hardened to not blindly trust data from off-chain processes. The best practice is to create an on-chain source of truth for allocations. An allocations mapping should be added to the contract where the owner sets the correct amount for each user. The claim function would still use the Merkle proof to verify eligibility, but it would use the on-chain allocations mapping to determine the amount to be minted.
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.