The ThePredicter::cancelRegistration()
function doesn't have any mechanism to prevent a reentrancy attack and doesn't follow the Check-effects-interactions pattern
If exploited, this vulnerability could allow a malicious contract to drain Ether from the ThePredicter contract, leading to loss of funds for the contract and its users.
Manual Review
To mitigate the reentrancy vulnerability, you should follow the Checks-Effects-Interactions pattern. This pattern suggests that you should make any state changes before calling external contracts or sending Ether.
Here's how you can modify the function:
Reentrancy of ThePredicter::cancelRegistration allows a maliciour user to drain all funds.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.