a security vulnerability that allows anyone to change the stored password without proper authorization. The contract doesn't check that only the owner can set the password.
An attacker could potentially call the vulnerable "setPassword" function and change the stored password. Here is an example of how this could be exploited:
function exploitSetPassword(string memory newPassword) external {
vulnerableContract.setPassword(newPassword);
}
Could potentially lead to compromise of very sensitive data due to a password change
Remix IDE
add the " if (msg.sender != s_owner) {
revert PasswordStore__NotOwner();
}" also to the "setPassword" 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.