Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Non-Owners can change the password

Summary

Any one can set new password.

Vulnerability Details

setPassword function (code) has no internal checks or modifiers to make sure msg.sender is indeed the owner.

Impact

Actual password that owner set will be rewritten and lost.

Tools Used

None.

Recommendations

Similar to the check in getPassword function (code), add an if block that reverts if msg.sender is not the owner.

Even better, create a new modifier (e.g. onlyOwner) that contains the said if block and add this modifier to both setPassword and getPassword functions to make sure no one other than the owner can call these functions to modify the password / see the password.

Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-lacking-access-control

Anyone can call `setPassword` and set a new password contrary to the intended purpose.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.