changeOwner
function has no access control and is callable by anyone.
By passing a new address _newOwner
to the function anyone can change the owner of the protocol.
As per the specifications and the implementation, the owner can set the price of boxes, add new rewards, and withdraw funds. All these are key aspects of the functionality, which when made accessible by a malicious user could lead to critical issues with the protocol as changing fees, depleting the protocol of its funds, etc.
The test snippet is already in the .t.sol file. Just run forge test --mt testChangeOwner
.
Manual Review, Foundry
Implement access control to the function.
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.