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

inadequate data privacy results in exposed stored password

Summary

Even though the s_password variable is private, it's not truly hidden. Anyone can inspect the contract's storage on the blockchain and retrieve the password.

The contract aims to store a private password securely. However, the current implementation does not ensure the privacy of the stored password

Vulnerability Details

The s_password variable, despite being marked as private, can be accessed by inspecting the contract's storage directly on the blockchain.

Impact

Any user can retrieve the stored password, compromising its confidentiality.

Tools Used

Manual code review.

Recommendations

  • Consider encrypting the password offchain before storing it onchain.

  • Decryption should also happen offchain to maintain the password's secrecy.

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.