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

Lack of access control

Summary

Lack of access control

Vulnerability Details

In PasswordStore.sol, the setPassword() function allows only the owner to set a new password, but it lacks any permission control.

Impact

A malicious user can call the function arbitrarily to change the password.

Tools Used

Recommendations

check only owner can set a new password

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.