The changeOwner()
function allows anyone to transfer ownership of the contract, leading to the potential hijacking of the contract.
The changeOwner()
function does not have any authorization check, allowing any user to change the owner to an arbitrary address:
Anyone can call this function to take control of the contract, allowing them to manipulate box prices, withdraw funds, and make other administrative changes. This could lead to a complete loss of control for the original owner and potential misuse of the contract.
Manual code review
Add an authorization check to ensure that only the current owner can change ownership:
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.