The contract stores a password in the private storage variable s_password.
In solidity, private variables are only private internally. They can still be read on the blockchain by external tools such as the web3.eth.getStorageAt() function, or even visually by using etherscan.io to look at the contract's bytecode.
Therefore, anyone can access the value of s_password and this makes the contract insecure.
Critical vulnerability
vscode, anvil, forge
instead of storing the password in plain text, it could be encrypted off-chain and the encrypted password passed to the setPassword function. This way the password is stored in an encrypted format and cannot be decrypted by anyone without the private key used to encrypt it.
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.