Anyone can call PasswordStore.setPassword() method to set new password
The setPassword() method has external visibility and no restriction to validate the caller is the owner of the contract or not.
Anyone can can set new password for this contract means that if external contract logic utilizing the password might fail.
Here is my PoC code using Foundry unit test
Manual review
Adding caller restriction for setPassword() method
Here is my implementation:
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.