The erc721_bridgeable.cairo contract uses the _mint function instead of safe_mint during token minting operations.
This oversight could lead to tokens being irreversibly sent to non-compliant contracts, resulting in the potential loss of NFTs.
The vulnerability is present in the following functions within the ERC721BridgeableMintableImpl implementation:
mint
mint_range
mint_uri
The functions listed above use the _mint function to mint new ERC-721 tokens. The _mint function directly assigns tokens to the recipient without verifying whether the recipient address can handle ERC-721 tokens.
https://docs.openzeppelin.com/contracts-cairo/0.15.1/api/erc721#ERC721Component-mint
If a token is minted to a contract address that is not aware of the ERC-721 standard, the token could be permanently locked or lost because the receiving contract may not implement the necessary logic to manage or return the token.
Visual Studio Code
To mitigate the risk of token loss, it is recommended that the _mint function be replaced with safe_mint. This change will ensure that tokens are only transferred to addresses that are capable of handling ERC-721 tokens.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.