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

Anyone can set a new password by using setPassword function

Summary

Anyone can set a new password by using setPassword function since it is an external function

Vulnerability Details

https://github.com/Cyfrin/2023-10-PasswordStore/blob/7a2fc760235c4f4809511186ff9a061c2ec68634/src/PasswordStore.sol#L26-L29

Impact

Attackers can choose any password they want and set it as new password, then they will control the password and do anything they want to the system

Tools Used

Manual review

Recommendations

Add onlyOwner modifier to setPassword function, guarantee only the owner can set new password

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.