The updateRegistry function in the GivingThanks contract is vulnerable due to a lack of access control. Currently, anyone can call this function to update the registry address, potentially redirecting it to a malicious contract. This can lead to unauthorized changes in the behavior of the contract, especially if the registry contract is used for critical validations like charity verifications.
Missing access control, allowing any user to update the registry address.
Unauthorized Access: Any user can change the registry address, which could redirect the contract's logic to interact with a malicious CharityRegistry contract.
Potential Exploits: Attackers could deploy a fake CharityRegistry contract, verify unauthorized charities, and exploit the GivingThanks contract by minting tokens or manipulating charity verification statuses.
manual review
restrict access to the updateRegistry function by adding an onlyOwner modifier. This will ensure that only the contract owner can 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.