The donate function is vulnerable to reentrancy attacks due to the external call to charity.call without adhering to CEI pattern.
The donate function transfers Ether to a charity using charity.call{value: msg.value}(""). If the charity contract has a fallback or receive function, it could potentially re-enter the donate function before the state changes (like _mint and tokenCounter increment).
Without protection, a malicious charity contract could repeatedly call donate, draining funds and minting multiple tokens.
Manual Review
Apply CEI pattern
Impact: High, one charity can reenter the donate function with the same ETH provided and mint several NFT. Likelyhood: Low, any malicious charity can do it but Admin is trusted and should verify the charity contract before "verifying" it.
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.