GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Registry could be replaced by anyone

Summary

There is no access control forGivingThanks::updateRegistry(address), registry contract could be manipulated by anyone.

Vulnerability Details

GivingThanksuses CharityRegistryas reference to check verified charities. However, GivingThanks::updateRegistryis public and able to be changed the reference by anyone else.

function updateRegistry(address _registry) public {
registry = CharityRegistry(_registry);
}

Impact

CharityRegistry could be manipulated and doner might send money to unverified charities.

Tools Used

Recommendations

function updateRegistry(address _registry) public {
+ require(admin == msg.sender, "Only Admin can change");
registry = CharityRegistry(_registry);
}
Updates

Lead Judging Commences

n0kto Lead Judge 8 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-anyone-can-change-registry

Likelyhood: High, anyone can change it at anytime Impact: High, can bypass the verification process

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.