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

setPassword() has no owner check

Summary

Anyone change the users password

Vulnerability Details

setPassword() has no check to revert if the caller is not the owner of the contract. So anyone calling this function can overwrite the password with a new one of their choice.

Impact

users password can be overwritten

Tools Used

foundry

Recommendations

add a check+revert if the caller is not the owner
ie:
if (msg.sender != s_owner) { revert PasswordStore__NotOwner() }

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.