The authorization scheme used in the getPassword() can be bypassed by spoofing a fake sender.
The use of msg.sender as an authorization scheme in a view function like in the getPassword() can be spoofed. Anyone can set a fake sender in a call request to bypass this protection since a signature is not verified in a call request.
https://github.com/Cyfrin/2023-10-PasswordStore/blob/856ed94bfcf1031bf9d13514cb21b591d88ed323/src/PasswordStore.sol#L36
An attacker can spoof the msg.sender as the legitimate owner to get the password from the getPassword().
Manual Review
There is no way to fully ensure the legitimacy of the caller of a view function.
Moreover, if the purpose is to 'hide' the sensitive content of the s_password variable, that would not work since several techniques exist to extract them. In other words, sensitive data like passwords should not be processed or stored on a public 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.