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

Password can be compromised.

Summary

  • Anybody can call the setPassword function and change the password to whatever they choose.

Vulnerability Details

  • There is no modifier or check which ensures that only the owner of the contract can set a new password.

Impact

  • Password can be changed easily by anyone.

Tools Used

Recommendations

  • Add an "onlyOwner" modifier to the setPassword function. The modifier logic should set msg.sender to the address of the owner of the contract.

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.

modey Submitter
about 2 years ago

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.