Passwordstore::setPassword does not implement an owner check, resulting in anyone being able to change the password.
As setPassword immediately sets the new password without doing any checks before, it can be called by anyone. This means the password can be set by anyone calling the contract.
This foundry test fails as the password is set to "notMyPassword" by other:
Anyone (not only the owner) can set a new password as the function has no access control.
foundry
manual review
Implement an owner check in Passwordstore::setPassword as already implemented in getPassword.
Alternatively a modifier could be created and added to both setPassword and getPassword function declarations to modularize the owner check:
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.