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

setPassword doesn't check ownership allows anyone to set password

Summary

Anyone can set a new password via setPassword().

Vulnerability Details

No ownership check is made in setPassword().

Impact

High. The issue is easy to find and the attacker can obtain access to the contract.

Tools Used

Manual check.

Recommendations

Check if msg.sender == owner directly in setPassword() or create an onlyOwner() modifier and apply the modifier to setPassword(). Revert if msg.sender is not the owner.

Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 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.