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

Private password string can still be retrieved from the storage.

Summary

While the variable visibility is set to 'Private' it may not be accessible within the contract it is defined, or through outside of the contract may return a compilation error. It is possible to get the value of a variable by going through the storage layout.

Vulnerability Details

The variable 's_password' is set as a private string, it can still be accessed by an attacker by going through the storage of the contract.

Impact

This allows any user/attacker visible access to the password string.

Tools Used

Manual Review

Recommendations

It is not recommended to save sensitive information such as passwords or private keys on the blockchain since this data can be accessed by anyone.

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.