CharityRegistry::isVerified Due to Incorrect Mapping ReferenceThe CharityRegistry::isVerified function mistakenly checks the registeredCharities mapping instead of verifiedCharities to determine if a charity is verified. This oversight results in any registered charity being marked as "verified" without admin approval, allowing unauthorized charities to receive donations.
The isVerified function currently references the registeredCharities mapping, as shown below:
Since the function checks registeredCharities instead of verifiedCharities, any charity that is merely registered will appear as verified, bypassing the intended verification process managed by the contract administrators.
Unverified charities can be incorrectly treated as verified, potentially allowing unauthorized entities to receive donations intended only for vetted charities.
This introduces a security risk by undermining the integrity of the donation system, allowing non-verified charities to be mistakenly trusted by donors.
Manual Review
Correct the mapping reference within the isVerified function to ensure only verified charities are marked as such:
This fix ensures the function accurately reflects the verification status by checking the verifiedCharities mapping, restoring the intended functionality.
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.