The mintSnowman
function in the Snowman The
ERC721 contract is publicly accessible. Under normal behavior, this function should only be called by a trusted contract, such as SnowmanAirdrop
to mint NFTs for eligible users who have staked Snow
tokens.
The specific issue is that there is no access control in place. As a result, any external account can call mintSnowman
and mint any number of NFTs to any address, without staking or validation. This completely bypasses the staking and eligibility logic, allowing malicious actors to drain or devalue the NFT collection.
Likelihood:
Any external user can discover and directly call mintSnowman()
via a transaction or script.
Since the contract is deployed and public, there are no obstacles to interacting with the function, making this issue trivially exploitable.
Impact:
A malicious user can mint an unlimited number of Snowman NFTs for free, diluting the value of the collection and breaking the staking reward mechanism.
This may also cause financial damage to holders and degrade trust in the system by invalidating the designed staking-to-reward relationship.
Starts a prank as an external attacker using vm.startPrank(attacker)
Calls the public mintSnowman
function to mint 1 NFT
Successfully mints the NFT without any access control or validation
Verifies the attacker's balance is now 1 NFT using assert
Confirms the global token counter has incremented to 1
Ends the prank session with vm.stopPrank()
This change ensures only the designated SnowmanAirdrop
contract can mint NFTs, maintaining the intended reward flow based on staked Snow
tokens.
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.