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

Password can be set by anyone

Summary

SetPassword() can be called by anyone at any point. it is not restricted to only the owner.

Vulnerability Details

This function fails to check if the msg.sender is the owner.

Impact

Anyone can change the password at any point.

Recommendations

It should be such that either
a) only the EOA owner of the contract can call setPassword()
b) if the password hash is stored, then whoever can supply a password whose hash matches that in the contract can set a new password.
The function call should revert otherwise.

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.