Any user can call GivingThanks::updateRegistry
and change the CharityRegistry
address, as a result of missing access control
Original owner deploys CharityRegistry
contract.
Having CharityRegistry
address, deploys GivingThanks
contract.
An attacker deploy ANOTHER CharityRegistry
contract.
An attacker could update the registry to a malicious contract using GivingThanks::updateRegistry
.
It gives opportunity to manipulate the contract’s behavior.
Anyone can call GivingThanks::updateRegistry
function and change the CharityRegistry
address, which can lead to a malicious entity redirecting the registry to their contract, compromising the entire system.
Manual, Remix IDE
To mitigate this issue, implement access control mechanisms, such as restricting this function to the contract owner or a privileged role. You can use the onlyOwner modifier from OpenZeppelin’s Ownable library to ensure only the owner can update the registry.
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.