The setAddresses function that initializes important contract state can be called by anyone.
See:
WJLP.setAddresses
Impact
The attacker can initialize the contract before the legitimate deployer, hoping that the victim continues to use the same contract.
In the best case for the victim, they notice it and have to redeploy their contract costing gas.
Handle
cmichel
Vulnerability details
The
setAddresses
function that initializes important contract state can be called by anyone.See:
WJLP.setAddresses
Impact
The attacker can initialize the contract before the legitimate deployer, hoping that the victim continues to use the same contract. In the best case for the victim, they notice it and have to redeploy their contract costing gas.
Recommended Mitigation Steps
Use the constructor to initialize the addresses.