GivingThanks

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

Incorrect Verification Check in `isVerified`

Summary

The isVerified modifier in CharityRegistry returns true if the charity is registered, instead of verifying whether it is verified.

Vulnerability Details

In the CharityRegistry contract, the isVerified function currently returns the registeredCharities mapping status, which checks if a charity is registered but not necessarily verified. As a result, any registered charity could bypass the verification requirement, allowing unverified charities to appear as valid in other contract functions, such as donation processing.

Impact

This vulnerability could enable unverified charities to receive funds and participate as if they were verified. This defeats the purpose of verification, which is intended to ensure only vetted charities can receive donations, thus compromising the platform's integrity and trustworthiness.

Tools Used

Manual Code Review

Recommendations

Modify the isVerified modifer to check the verifiedCharities instead of registeredCharities.

Updates

Lead Judging Commences

n0kto Lead Judge 12 months 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.