The updateRegistry
function in the GivingThanks
contract is publicly accessible, allowing anyone to redirect donations to a malicious registry, bypassing charity verification.
The updateRegistry function in the GivingThanks
contract is publicly accessible, allowing any external user to call it. This can be exploited by a malicious user to change the registry address to a malicious contract, effectively bypassing the charity verification process. This unauthorized change could lead to donations being sent to unverified or malicious addresses.
An attacker can redirect donations to a malicious contract by replacing the legitimate CharityRegistry address with their own, allowing unauthorized access to funds intended for verified charities
Manual Inspection
Use onlyOwner
modifier, so that onlyOwner can call this function.
Here is the PoC code to demonstrate the issue to run against foundry:
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.