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

Anyone can set new password

Summary

As we can understand from notice of function, only owner can set new password. But there isn't checks for owner is equal for msg.sender.

Vulnerability Details

access control issues. anyone can use function which must be called by only owner

Impact

attacker can set new password and admin will lost his password.

Tools Used

manual review

Recommendations

add this after 26 line -
if (msg.sender != s_owner) { revert PasswordStore__NotOwner(); }

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year 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.