In the refund function of the ChristmasDinner contract, users who have set their participation status to false can still withdraw their funds, even though they are no longer considered participants. This vulnerability allows users who have opted out (referred to as Funders) to withdraw their funds, even though they should not be able to do so, thus enabling exploitation of the refund mechanism.
The refund function does not include a check to ensure that users who are marked as false (opted-out participants) are prevented from withdrawing their funds. As a result, users who have previously chosen to leave the event (set to false) can still call the refund function and retrieve their funds, which goes against the intended behavior of the contract.
This behavior allows Funders to withdraw their funds even if they are not attending the event, which undermines the fairness of the system.
Manual code review
Add a check to the refund function to ensure that only active participants (those with participant[msg.sender] == true) can withdraw their 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.