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

Anyone can set a new password

Summary

Anyone can set a new password

Vulnerability Details

Notice says: @notice This function allows only the owner to set a new password.
But function don't have modifier or security check on msg.sender.

Impact

Anyone can set a new password overwriting the previous one.

Tools Used

Manual review

Recommendations

Add the line:

require(s_owner == msg.sender, "Not owner")

or by using the custom error:

if (msg.sender != s_owner) {
    revert PasswordStore__NotOwner();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
about 2 years ago
inallhonesty Lead Judge about 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.