Mystery Box

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

Missing access control

Summary

Missing access control

Vulnerability Details

Missing access control for changing owner. Anyone can become owner and steal the rewards.
https://github.com/Cyfrin/2024-09-mystery-box/blob/281a3e35761a171ba134e574473565a1afb56b68/src/MysteryBox.sol#L111C1-L113C6

Impact

Owner can be changed without validation.

Tools Used

MR

Recommendations

Only allow current owner to change address

function changeOwner(address _newOwner) public {
owner = _newOwner;
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago

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!