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

Anyone can set a new password

Summary

Anyone can set a new password by calling setPassword() since it does not require any role to change it.

Vulnerability Details

The function setPassword()expects only the owner to be able to call it but the function does not check if the sender is is the owner of the contract.

Impact

Anyone user can alter the s_password variable.

Tools Used

Manual

Recommendations

Add an owner requirement to change the password. This will only prevent anyone from changing the password but wont fix the contract flawed design.

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.