It is specified that only the contract owner should be able to change the password. However setPassword doesn't check if the message sender is the owner, allowing anyone to set a new password.
The vulnerability allows any user to call the setPassword function and set a new password, as shown in the following foundry PoC:
Anyone can change the password, violating the intention of the smart contract.
Foundry, manual review
Add the following verification before changing the value of s_password 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.