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

Anyone can retrieve the password

Summary

The s_password could be retrieved by either analyzing the smart contract storage layout or the setPassword() transaction data.

Vulnerability Details

Storing plaintext password in a smart contract is not a good idea. The storage of a smart contract is public to anyone having access to a blockchain node. Specifically, by using the getStorageAt() RPC, all storage slots of a smart contract could be retrieved. An even easier way is using the "evm.storage" tool.

Impact

Anyone can retrieve the password.

Tools Used

Manual review

Recommendations

Don't use public chain to store password.

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.