Anyone can change the address pointing to CharityRegistry using the GivingThanks.updateRegistry(address _registry)
function.
The function GivingThanks.updateRegistry(address _registry)
changes the contract variable that points to CharityRegistry
contract. There is no access control to this function, so anyone can change the address of the CharityRegistry
contract at any time.
The CharityRegistry
contract is responsible for the registration and verification of charities. Changing the contract by a rogue actor could result in unverified charities being able to receive donations from participants.
Use the following test function in the GivingThanks.t.sol
test contract.
Correct charityContract.updateRegistry()
function as follows:
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.