Unprotected setPassword function allows anyone to set & reset the password
The function setPassword is supposed to be exclusively available to the contract owner. However, it lacks access-control restriction check therefore allowing anyone to successfully call it.
POC
Add this test to PasswordStore.t.sol
Then run it as
Test results:
Anyone can set & reset the password therefore the original owner-set password is lost.
Manual review
Add a check to restrict function access-control to contract owner
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.