The isVerified function in CharityRegistry returns registeredCharities status instead of verifiedCharities status, allowing donations to unverified charities.
https://github.com/Cyfrin/2024-11-giving-thanks/blob/main/src/CharityRegistry.sol#L23-L25
Registry contract handles the registered charities and verified charites in different mappings. Currently above function is using registeredCharities mapping instead of verifiedCharities.
This will allows unverified registries to bypass the checks in GivingThanks: donate due to following check:
Allows donations to unverified charities
Bypasses the core security mechanism of the platform
Compromises platform's trustworthiness
Manual Review, Foundry
This can be fixed by using correct mapping in isVerified function as given below.
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.