In normal behavior, the mintSnowman
function is intended to be called by a trusted contract (such as an airdrop distributor) to mint Snowman NFTs to eligible users based on off-chain logic or Merkle proofs. In this project, this contract is SnowmanAidrop
However, the function is marked external
and lacks any form of access control. This allows any arbitrary external address to call mintSnowman
, minting an unlimited number of NFTs to themselves or others without restriction.
Likelihood:
This will occur any time an attacker directly interacts with the contract and invokes mintSnowman
, since there is no modifier or check preventing public access.
It does not require any special privileges or prior conditions; a standard external call from a web3 wallet or script is sufficient.
Impact:
Unlimited and unauthorized minting of NFTs, leading to total dilution of supply and value.
Project credibility may suffer significantly if an attacker exploits this to flood the market
Add the following test in the test contract TestSnowman
Restrict access to only an authorized minter, such as the airdrop contract:
This ensures that only the intended contract (here the airdrop distributor) can mint NFTs, preventing unauthorized access.
The mint function of the Snowman contract is unprotected. Hence, anyone can call it and mint NFTs without necessarily partaking in the airdrop.
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.