The function mintSnowman() is publicly accessible with no access restrictions. Any external user or contract can mint unlimited NFTs at any time.
mintSnowman() is external and callable by anyone.
The contract lacks any kind of role-based access control.
There is no onlyOwner modifier or similar restriction to ensure only authorized parties (such as the Airdrop contract) can mint.
This exposes the entire minting mechanism to abuse.
function testMintUnlimitedSnowmanPOC() public {
vm.startPrank(bob);
nft.mintSnowman(bob, 2);
nft.mintSnowman(bob, 2);
nft.mintSnowman(bob, 2);
nft.mintSnowman(bob, 2);
vm.stopPrank();
assert(nft.getTokenCounter() == 8);
}
Unlimited NFT inflation.
HIGH
HIGH
Introduce proper access control: Add onlyAirdrop modifier to mintSnowman.
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.