Malicious actor can claim donations repeatedly as there is no require check.
In the current logic of the donate
function, there is a vulnerability that allows a single user to repeatedly call this function, potentially draining the contract or spamming with multiple donation calls.This issue arises cuz there is no mechanism to track donations.
Enabling malicious actors to call donate
function as many times as they want.
Also malicious user can repeatedily call donate
function and could drain the contract funds.
Manual Review
Add a mapping to check, if the user have already donated.
Donors can do several donations, as in real life, they will just pay the gas fee to have several NFTs. No real impact here since the donation amount is store on the NFT metadata.
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.