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

Anyone can find the password

Summary

Marking a variable as private only makes the variable not visible to other contract but everyone can find the value of the variable from its storage slot. Therefore, s_password is visible to everyone. Anyone can retrieve the password from the storage of the contract.

Vulnerability Details

This contract is highly vulnerable to attacks.

Impact

This has high impact on the security of the contract. since anyone can find the password.

Recommendations

It's better to not to store the confidential data in the contract.

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.