The smart contract PasswordStore.sol is designed to store a private password, but the password is stored in plain text on-chain. This poses a severe security threat as anyone can access the blockchain's storage and retrieve the password since all data on the chain is publicly visible.
In PasswordStore.sol:14, the variable s_password is stored as plain text; anyone can check the contract's storage and get its contents since everything on chain is publicly visible..
This vulnerability allows malicious actors or curious users to easily access and read the password, rendering the purpose of the contract - to keep the password private - completely ineffective.
Manual Review
It is highly recommended to store the hash of the password instead of the plain text password. This ensures that even if someone accesses the contract's storage, they won't be able to easily retrieve the original password. Furthermore, it's essential to understand that smart contracts are not an appropriate place to store information that is meant to remain private. Regardless of the visibility assigned to a variable, anyone can see the values a variable holds on the blockchain.
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
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.