Anyone can change password before or after owner sets it's password.
setPassword()
function does not have any check for who is calling it, hence it is callable by anyone. So anyone can change the password just by calling aforementioned function, which disrupts the whole point of smart contract.
POC: Add this function to PasswordStore.t.sol and run "forge test --match-test test_non_owner_can_change_password"
Because of this bug, the protocol loses its whole purpose, because the password's should not be changeable by anyone other than owner.
Manual Review
Add owner check for setPassword() function as done in getPassword() like below:
Anyone can call `setPassword` and set a new password contrary to the intended purpose.
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.