Summary
The refund
function allows contributors to refund their contribution even if the fundraising goal has already been reached.
Vulnerability Details
In the refund
function:
The function only checks if the deadline has passed before allowing a refund.
There is no check to prevent refunds if the goal has been met before the deadline.
Impact
Contributors can withdraw funds even after a successful fundraiser, which may result in an improper reduction of the fund’s balance.
This could allow a potential exploit where users contribute, wait for the goal to be reached, and then refund while funds are still being used.
Tools Used
Manual code review
Recommendations
Before allowing a refund, add a validation check:
This ensures that refunds are only allowed when the goal is not yet met.
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.