The setPassword() function allows anyone to overwrite the s_password which should only be written by the s_owner.
As shown in the code snippet below, the setPassword() function is an external function without access control.
Therefore, anyone can call the function with an arbitrary newPassword
to overwrite the s_password
.
The password could be easily tampered.
Manual review
Add "require(msg.sender == s_owner)" check in setPassword().
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.