Snowman Merkle Airdrop

First Flight #42
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Unrestricted Mint Function in mintSnowman

Unrestricted Mint in mintSnowman function leads to attacker mint as many NFT as he wants

Description

  • The mintSnowman function allows any external user to mint an arbitrary number of ERC721 tokens without restriction or validation:

// There is no modifier or check
function mintSnowman(address receiver, uint256 amount) external {
for (uint256 i = 0; i < amount; i++) {
_safeMint(receiver, s_TokenCounter);
emit SnowmanMinted(receiver, s_TokenCounter);
s_TokenCounter++;
}
}

Impact:

  • Any malicious user to mint unlimited NFTs to themselves.

Recommended Mitigation

  • Use onlyOwner modifier

Updates

Lead Judging Commences

yeahchibyke Lead Judge 5 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Unrestricted NFT mint function

The mint function of the Snowman contract is unprotected. Hence, anyone can call it and mint NFTs without necessarily partaking in the airdrop.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.