Any user (not just the owner) can set a new password, overwriting the stored one.
The function setPassword(string memory newPassword)
does not check that the user calling the function is actually the owner of the Password Store. As a result, anyone can call the function and set a new password, overwriting the stored one.
The stored password is lost - a severe disruption of protocol functionality. Easily exploited - see Foundry/Forge PoC below.
Foundry/Forge
Only allow the owner to use the setPassword(string memory newPassword)
function to set the password.
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.