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

Lack of access control for setPassword()

Summary

Lack of access control in PasswordStore.setPassword() let non-owner user to set a new password

Vulnerability Details

Based on the context, PasswordStore.setPassword() should be onlyOwner as it should only be allowed to be called by the owner.

However, PasswordStore.setPassword() lack access control in the current implementation.

Impact

An non-owner users can call setPassword() to set another new password, when the owner tries to get the previously set password, he gets an incorrect password.

Tools Used

Manual Review

Recommendations

PasswordStore.setPassword() should be onlyOwner or check if msg.sender is the owner.

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.