The vulnerability in the selectWinner function arises from the use of the _safeMint function without proper reentrancy protection. _safeMint makes an external call to onERC721Received in the recipient contract, which can be exploited by malicious contracts for reentrancy attacks.
The _safeMint function used to mint NFTs, involves making an external call to the onERC721Received function in the recipient contract. If the recipient contract is malicious, it can implement onERC721Received in a way that reenters the calling contract leading to reentrancy vulnerabilities. In this case, the selectWinner function is particularly vulnerable because it mints NFTs without any reentrancy protection.
Attacker could manipulate the prize distribution
Manual analysis
Implement Reentrancy Protection:
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.