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

Password Access

Summary

The goal of the contract is to store password securely. But the password is visible to all and anybody can set the password.

Vulnerability Details

In Line 14: string private s_password;
the s_password is declared as private it is still visible to anyone who wants to inspect the blockchain's contents. Storing passwords in a smart contract would expose them to the public, making it a significant security risk.

Impact

The password will be revealed.

Tools Used

Git, Foundry

Recommendations

You can hash the password before storing it to 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.