Mystery Box

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

`MysteryBox::claimAllRewards` is vulnerable to reentrancy attack.

Summary:

There is nothing preventing an attacker from reentering the contract using the claimAllRewardsfunction causing the attacker to drain funds.

Vulnerability Details:

An adversarial contract can use their recieveor fallbackfunction to reenter the contract in order to drain all of the eth stored.

Impact:

Critical.

Tools Used:

Manual review, Slither.

Recommendations:

Following proper CEI prevents reentrancy by deleting the rewardsOwnedamount before sending out the funds, causing the transaction to revert when trying to reenter.

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:

`claimAllRewards` reentrancy

Support

FAQs

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

Give us feedback!