GivingThanks

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

Unused owner variable

Summary

The contract defines an owner variable that is not used in any access control checks or logic. Instead, it should use a proper access control mechanism to restrict critical functions to the owner.

Vulnerability Details

Impact

Anyone can call updateRegistry() to change CharityRegistry's admin

Tools Used

manual

Recommendations

function updateRegistry(address _registry) public {
+ if (msg.sender != owner) revert("Not owner");
registry = CharityRegistry(_registry);
}
Updates

Lead Judging Commences

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