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

Anyone can read the owner's password

Summary

Anyone can read the private state variable s_password.

Vulnerability details

s_password is defined with a private visibility but this does not mean that the variable is private and that no one can access it. The variable is accessible through the contract storage.

Impact

This way, anyone can read the owner's password.

Recommendations

One solution is to encrypt the password off-chain and store the encrypted password on-chain.

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-anyone-can-read-storage

Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential

Support

FAQs

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