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

Missing access control in `setPassword`

Summary

Anyone can change the password.

Vulnerability Details

setPassword should only be callable by the owner of the contract. However the function is not protected with access-control such as a onlyOwner modifier allowing anyone to change the password

Impact

password can be changed without the owner being aware of it.

Tools Used

manual review

Recommendations

add a onlyOwner modifier like this:

modifier onlyOwner() {
require(msg.sender == s_owner, "PasswordStore: not owner");
_;
}
```
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.