The updateRegistry function in GivingThanks allows any user to update the CharityRegistry address, which could lead to malicious modifications of the verified charity list.
In the GivingThanks contract, the updateRegistry function does not restrict access, allowing any caller to update the CharityRegistry address. This opens the possibility for an attacker to redirect all verification checks to a different registry, enabling unverified charities to receive donations.
An unauthorized user could exploit this to bypass verification controls, compromising the platform’s security by allowing unverified addresses to act as charities. This could lead to donation redirection, effectively stealing funds intended for verified charities.
Manual Code Review
Restrict the updateRegistry function to only allow the owner (contract deployer) to update the registry address.
Likelyhood: High, anyone can change it at anytime Impact: High, can bypass the verification process
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.