GivingThanks

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

Smart Contract Security Analysis Report

Vulnerability: Lack of Proper Access Control in updateRegistry Function

Date: 13.11.2024

Severity: Low

Description:
The updateRegistry function in the GivingThanks contract allows any user to update the registry address, which is likely a security concern as it could be exploited to disrupt the charity verification process or redirect donations to unauthorized addresses.

Mitigation:
Restrict access to this function to only the owner of the contract:

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

Note: This assumes the GivingThanks contract inherits from Ownable as per the import statement.

Updates

Lead Judging Commences

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