Mystery Box

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

Broken access control in `changeOwner` function

Summary

changeOwner function does not have onlyOwner modifier or any access control restrictions.

- function changeOwner(address _newOwner) public {
owner = _newOwner; //@audit-issue broken access control
}

Impact

Anyone can become an owner of MysteryBoxcontract and drain all its funds.

Recommendations

Add access control protection .

Updates

Lead Judging Commences

inallhonesty Lead Judge
11 months ago

Appeal created

inallhonesty Lead Judge 11 months 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.