Anyone can set the user password to any arbitrary value. This would allow an attacker to change the password and access any system that this contract safeguards.
The comments in the setPassword function (line 26) indicates that only the owner s_owner would be able to call this function. However, the function is missing any check that ensures that this is true.
This completeley breaks the protocol. Allowing anyone to change the password renders the getPassword function useless, given that any attacker may know the password that they might be setting for themselves.
Solidity testing. See POC
Add this check at the top of the function.
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.