The mintSnowman
function should only allow minting Snowman NFTs through the SnowmanAirdrop
contract, based on the user's Snow
token balance.
Currently, the function is external
and does not apply any access restriction or balance check, allowing any address to mint an arbitrary amount of NFTs without limit.
Likelihood: High
Any user can interact directly with the mintSnowman
function without any balance verification, nor is it protected by permissions or access control. This allows unlimited NFT creation.
Impact: High
The Snowman NFT collection completely loses its scarcity, as anyone can mint unlimited amounts.
Logics that depend on legitimate ownership of these NFTs (e.g., access, staking, airdrops) are broken.
A new user is created and it is verified that they have no Snow
tokens.
The user executes mintSnowman()
to mint 1000 NFTs.
It is verified that the user correctly receives the 1000 NFTs despite having no Snow
tokens.
To ensure that only the authorized SnowmanAirdrop contract can mint Snowman NFTs, we recommend restricting access to the mintSnowman() function. This adds a permission check and prevents misuse of the minting logic. Below are the suggested changes:
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.