The GivingThanks::updateRegistry
function lacks appropriate access controls, allowing any user to modify the charity registry contract. This vulnerability could enable a malicious actor to deploy a new, malicious charity registry contract and update the GivingThanks::registry state to perform unauthorized actions, such as getting themselves verified to receive donations.
By exploiting the access control vulnerability in GivingThanks::updateRegistry
, a malicious actor could change the registered charity contract to their malicious contract. This would allow the attacker to receive donations intended for the legitimate charity
Manual Review
The following Foundry test demonstrates how an attacker can exploit the lack of access controls in the GivingThanks::updateRegistry function to maliciously register themselves as the verified charity recipient and receive donated funds.
To mitigate this issue, restrict unauthorized user to call GivingThanks::updateRegistry
function, by allowing only admin call this function.
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.