Never store passwords on-chain because user-passed arguments to functions will always be visible to miners.
PasswordStore.sol - Lines 26 - 29
The setPassword function takes the newPassword as an argument and stores it in the s_password state variable.
This is vulnerable to mempool attacks because once a user submits their transaction to set a new password, it is stored in the mempool, where the miner can view the transaction and include it in the next block for on-chain confirmation on the blockchain.
If the miner is malicious, they can access the user-submitted password from the transaction and potentially act maliciously
The attacker will have access to the password, which can be used to exploit areas where the owner utilizes this password. Based on the user's password pattern, the attacker can also predict passwords for the owner's other platforms.
Manual Review
Never store passwords on-chain.
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.