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

Missing access control at PasswordStore::setPassword()

  • Function setPassword() from PasswordStore smart contract doesn't have access control implemented

  • The comment from developer says only the owner can set a new password, but in reality anyone can execute the function with any argument

  • To mitigate this issue, just copy the access control code from getPassword() to setPassword() too

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.