GivingThanks

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

Anyone can update `CharityRegistry` contract

Summary

GivingThanks protocol has ability to update the CharityRegistrycontract, but it should be allowed only for admins, unfortunately it lacks this check.

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

Vulnerability Details

Impact

Anyone can change the registry address.

Tools Used

Manual review.

Recommendations

Add check if the caller of the function is admin

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

Lead Judging Commences

n0kto Lead Judge 12 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.