`SnowmanAirdrop` constructor does not validate `_merkleRoot != bytes32(0)`, risking a permanently non-functional airdrop if misconfigured at deployment
`SnowmanAirdrop`'s constructor validates that `_snow` and `_snowman` are non-zero addresses, but performs no equivalent check on `_merkleRoot`. Since `i_merkleRoot` is immutable, a deployment with an accidentally-zero root cannot be corrected after the fact. Every call to `claimSnowman` would fail `MerkleProof.verify` permanently, requiring a full contract redeployment and migration to recover.
Likelihood:
Low. This requires a deployment-time operator error rather than any attacker action, and is not something a malicious third party can trigger — it depends entirely on correct off-chain deployment tooling and process discipline.
Impact:
A deployment misconfiguration, unset environment variables, or copy-paste errors, all of which are realistic operational risks rather than purely theoretical ones, results in a completely non-functional airdrop contract with no on-chain recovery path. The only remedy would be a full redeployment of `SnowmanAirdrop`.
Add the folllowing test to the `TestSnowmanAirdrop.t.sol`:
Run the test in the terminal:
If the test passes, the vulnerability exists.
Add a corresponding validation check to the constructor for the merkel root:
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.