The MysteryBox::changeOwner function does not check if msg.sender is the owner, allowing anyone to call the function.
Anyone can obtain owner privileges and call MysteryBox::withdrawFunds to drain the contract balance.
User calls MysteryBox::changeOwner with their own address as parameter.
User becomes the owner of the contract.
User calls MysteryBox::withdrawFunds.
All contract balanced is transferred to the user.
Manual Review, Foundry
Create a modifier or add a require or if statement to the beginning of the function to check if msg.sender is the owner.
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.