Description: SoulboundProfileNFT::mintProfile
performs a _safeMint operation before updating the contract's internal state variables. The _safeMint function from OpenZeppelin's ERC721 implementation invokes _checkOnERC721Received, which allows a receiving contract to execute arbitrary logic via the onERC721Received callback. If msg.sender is a malicious smart contract, it could attempt to re-enter SoulboundProfileNFT::mintProfile
before the state variables are updated.
Recommended Mitigation: Reorder the state updates to occur before calling _safeMint. This ensures that critical data is set before any external interaction. Although no immediate exploit exists, following the principle of "Checks-Effects-Interactions" enhances the contract's resilience against potential attacks.
Likelihood: High, anyone can do it. Impact: Low, several profile will be minted, which is not allowed by the protocol, but only the last one will be stored in profileToToken and won't affect `likeUser` or `matchRewards`.
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.