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

[H-02]: It is risky to store any form of password on the blockchain, even when it could be encoded

Impact

string private s_password;

The password represented by the private variable s_password is not actually private, as anyone can easily use a block explorer or similar tool to retrieve the password of the owner and potentially access the owners controls/accounts that rely on this password, which may or may not involve sensitive information or even large amounts of funds.

Tools Used

Manual Analysis

Recommendations

Even if some mechanism is used to encode the password, as long as there is a variable/function present to retrieve the password, any user could eventually retrieve the password. As such, password storage should be kept off-chain for now to prevent any risk of password access.

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.