The contract lacks proper access control for the setPassword
function, making it vulnerable to unauthorized changes in the password by anyone.
The setPassword
function's visibility is external and it does not contain any access control mechanisms. As a result, any address can call this function and change the stored password without restrictions.
Any malicious user can call the setPassword function and change the password
Manual Analysis
Add a require check for msg.sender == s_owner to the function.
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.