The changeOwner function, as it's name implies, changes the owner address for a given address, but the function itself lacks access control, meaning anyone can call the function and set himself as owner, giving him access to the withdrawFunds function, allowing him to steal all the funds in the contract.
You may add the following PoC to TestMysteryBox.t.sol to corroborate the issue
Anyone can set himself as owner and drain the contract's ether.
manual review
Add a onlyOwner requirement to changeOwner
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.