Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

cancelRegistration is vulnerable to Reentrancy

Description

ThePredicter::cancelRegistration sends funds before setting status, making the function vulnerable to Reentrancy attack.

Impact

A malicious User could steal all the funds from the contract.

Recommendations

In ThePredicter::cancelRegistration, move playersStatus[msg.sender] = Status.Canceled; up two lines, at the beginning of the if, before the call to send the funds

Updates

Lead Judging Commences

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

Reentrancy in cancelRegistration

Reentrancy of ThePredicter::cancelRegistration allows a maliciour user to drain all funds.

Support

FAQs

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