Description:
Impact: High
Likelihood: High
The MysteryBox::changeOwner()
function is publicly callable without any restrictions and allows any user to claim ownership of the contract resulting in being able to execute privileged functions.
Vulnerable Code:
Impact:
Any user can claim ownership and in the worst case scenario call MysteryBox::withdrawFunds()
, which allows any said user to withdraw all paid fees.
Tools Used:
Manual Review, Foundry Forge
Proof of Concept:
The following test demonstrates how an arbitrary user can call MysteryBox::changeOwner()
to take control over the protocol and gain access to sensitive functions like MysteryBox::withdrawFunds
:
Recommended Mitigation:
Employ following require, as in the remaining privileged functions:
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.