The password is stored directly on the blockchain in a private
variable s_password
. Even though the variable is marked as private
, it is not hidden from blockchain observers. Anyone can inspect the contract's state and retrieve the hashed value of the password.
High. While users cannot directly view the password from the contract's public interface, any attacker could retrieve the password from the blockchain data storage, easily accessible with tools like Foundry, Remix or evm.storage.
Avoid storing sensitive data, like passwords, directly on the blockchain. Consider using off-chain methods for storing such data or implementing encryption methods.
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.