A critical issue has been identified in the implementation of the donate
function, stemming from a flaw in the isVerified
function of the CharityRegistry
contract.
The donate
function contains a verification check for the recipient address. However, the isVerified
function in the CharityRegistry
contract is incorrectly implemented. As a result, donations can be successfully processed for both registered and unregistered addresses. This vulnerability leads to unauthorized NFT creation
and donation
for unverified recipients.
Add this code
to tests , but as there is a bug in the constructor of the GivingThanks
contract , fix it before running tests .
Due to this error, it becomes possible for donations to be made to unverified addresses
, resulting in the improper issuance of NFTs and donations
.
Manual code review
Review and correct the implementation of the isVerified
function in the CharityRegistry
contract.
Likelyhood: High, the function returns registered charities instead of verified ones. Impact: High, Any charities can be registered by anyone and will be declared as verified by this function bypassing verification.
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.