GivingThanks

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

updateRegistry function can be called by attacker

Summary

updateRegistry() in GivingThanks contract doesnt have access control

Vulnerability Details

Any user can call this function and update the registry variable

https://github.com/Cyfrin/2024-11-giving-thanks/blob/304812abfc16df934249ecd4cd8dea38568a625d/src/GivingThanks.sol#L57

Impact

Attacker can create another contract and route all calls to attacker contract

Tools Used

Manual review

Recommendations

use ownable contract properly in constructor and onlyOwner modifier in this function updateRegistry()

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.