RustFund

First Flight #36
Beginner FriendlyRust
100 EXP
View results
Submission Details
Severity: high
Valid

Contributors can get a refund even if the campaign goal was reached

Summary

The refund flow is not working as intended.

Vulnerability Details

In this refund function: https://github.com/CodeHawks-Contests/2025-03-rustfund/blob/main/programs/rustfund/src/lib.rs#L66

There is not check on the current goal therefore allowing a user to get a refund even if the goal was reached.

Impact

The code is not respecting the specs.

Tools Used

Manual review

Recommendations

Implement a check on amount_raised > fund.goalto prevent refund if it is true.

Updates

Lead Judging Commences

bube Lead Judge
6 months ago

Appeal created

bube Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

There is no check for goal achievement in `refund` function

Support

FAQs

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