In CharityRegistry
contract we have a function called isVerified
which is used to check if the charity is verified before donating. But isVerified
will always return true if the charity is registered as we are using registeredCharities[charity]
check to verify the charity instead of verifiedCharities[charity]
.
In the isVerified
function, we are using incorrect mapping to check if the charity is verified or not. We should be using verifiedCharities[charity]
instead of registeredCharities[charity]
.
isVerified
will always return true if the charity is registered allowing the malicious actor to register the malicious charity contract and steal all the donations.
Manual review and foundry.
Replace registeredCharities[charity]
with verifiedCharities[charity]
.
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.