GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Incorrect Verification logic in `CharityRegistry::isVerified` function

Summary

The logic in the CharityRegistry::isVerified function is incorrect; it does not check if the charity is verified, only if it is registered.

Vulnerability Details

The function will always return True as long as the charity is registered. This verification should be performed by the admin (who deploys the CharityRegistry contract) who determines if a charity is legitimate or not, and only if it is, it will be eligible to receive donations. But with this logic flaw any registered charity will be considered verified by default.

Impact

Any registered charity will be considered verified, allowing unverified charities to receive donations, specially malicious ones.

Tools Used

Foundry, Remix

Recommendations

Modify the CharityRegistry::isVerified function to check if a charity is actually verified, not just registered.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-isVerified-return-registered-charities

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.