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

Private variables can be accessed by other users in PasswordStore contract.

Summary

This report describes a vulnerability in the PasswordStore contract that allows attackers to access the owner and password variables even though they are declared as private. This vulnerability could allow attackers to steal passwords and gain access to user accounts.

Vulnerability Details

The vulnerability is due to the fact that the owner and password variables are stored in storage slots on the Ethereum blockchain. Anyone can view the values of storage slots, even if they cannot access the variables directly. While the contract intends to restrict access to these variables, the use of private may not provide a sufficient level of security. Malicious users may employ low-level techniques to access storage slots potentially compromising the privacy of the owner and the stored password.

Impact

The impact of this vulnerability is that it could allow attackers to steal passwords and gain access to user accounts. This could have a number of negative consequences for users including financial loss, identity theft and damage to reputation.

Tools Used

Manual analysis

Recommendations

Avoid storing sensitive information on the blockchain.

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.