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

Lack of Access control

Summary

Lack of Access Control

Vulnerability Details

The contract lacks proper access control, allowing anyone to set a new password. The function name setPassword can be misused which is present on line 26 in PasswordStore.sol

Impact

Malicious actors can change the stored password, compromising the system's security.

Tools Used

Manual review

Recommendations

Implement access control to ensure only the owner can set the password. You can use the require statement to check if msg.sender is the owner or IF condition can also be used with custom errors.

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.