Access control issues occours when insecure visibility settings give attackers straightforward ways to access a contract's private values or logic, or when there aren't checks in place (such as modifiers) to validate callers.
Missing modifier on setPassword function allows an attacker to use it to change the contract's password.
PasswordStore's setPassword function doesnt implement access control such as a modifier to restrict the caller of the function so anyone can change contract password variable:
Create a new test function in provided test file PasswordStore.t.sol:
Run test with verbose option:
Anyone can change contract password leading to high integrity loss.
Manual analysis
Implement a modifier or a require to protect this functionality such as
https://github.com/crytic/not-so-smart-contracts/tree/master/unprotected_function
https://swcregistry.io/docs/SWC-123/
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.