The updateRegistry function allows any user to update the registry address without any access control. This poses a security risk as it can lead to unauthorized changes to the CharityRegistry contract address, potentially allowing malicious actors to manipulate the behavior of the GivingThanks contract.
Unauthorized Access: Any user can call this function and change the registry address, which could lead to the contract interacting with an unverified or malicious CharityRegistry.
Implement access control to restrict who can call the updateRegistry function. This can be done by using the onlyOwner modifier from the Ownable contract or implementing a custom access control mechanism.
Adding access control to the updateRegistry function is crucial for maintaining the integrity and security of the GivingThanks contract. This change will help prevent unauthorized modifications to the CharityRegistry 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.