The CharityRegistry::isVerified
function is intended to check whether a charity is verified. However, it currently only checks if the charity is registered, not if it is actually verified. The function returns the value of registeredCharities[charity], which indicates whether a charity has been registered but does not account for whether it has been approved by an admin. As a result, unverified charities that are merely registered can still appear as "verified," potentially allowing unauthorized charities to use the system as if they had been fully verified.
This logic vulnerability may lead to unverified charities being treated as verified, as the system only checks for registration status and not verification status. This could result in donations being sent to unverified charities, undermining the trustworthiness of the platform and potentially leading to fraudulent activity.
Place this test in test/CharityRegistry.t.sol
.
Update the CharityRegistry::isVerified
function to check both registration and verification status by referencing verifiedCharities[charity]
instead of registeredCharities[charity]
. This ensures that only charities approved by the admin are considered verified.
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.