Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Anyone can call the `changeOwner()` function

Summary

There is a changeOwner() function which is set to public, therefore anyone can call the function and become the owner and perform all the actions such as set the price of boxes, add new rewards, and withdraw funds.

Vulnerability Details

a public changeOwner() function in line 111 of MysteryBox.sol

Impact

anyone can call the function and become the owner and perform all the actions such as set the price of boxes, add new rewards, and withdraw funds.

Tools Used

None :- manual reading of the contract

Recommendations

change the function visibility to private or can just remove the function.

Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Anyone can change owner

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!