Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Using ERC721::_mint() can be dangerous

Summary

Using ERC721::_mint() can mint ERC721 tokens to addresses which don't support ERC721 tokens. Use _safeMint() instead of _mint() for ERC721.

Vulnerability Details

In these parts, the _mint function is used, which can be dangerous

_mint(address(this), tokenId);
_mint(recipient, tokenId);

Impact

Tools Used

none

Recommendations

Use _safeMint() instead of _mint() for ERC721.

Updates

Appeal created

bube Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Use of `_mint` instead of `safeMint`

Support

FAQs

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