The function lacks an ownership check, allowing anyone to call refund on behalf of a contributor. Without verifying that the refund is being requested by the original contributor, an attacker could steal someone else's refund.
A malicious user can call the refund function and get a refund on behalf of another contributor. The function does not check if ctx.accounts.contributor.key() matches ctx.accounts.contribution.contributor
Users can lose their refund if attacker claims it first.
Manual
Ensure that only the original contributor can claim their refund:
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.