The withdraw function in the RustFund program does not check if the deadline has passed before allowing the fund creator to withdraw all contributed funds. This is a serious security issue as it allows the fund creator to withdraw all contributions at any time, even if the funding period is still active.
User A creates a fund using fund_create with a deadline 30 days in the future
User B contributes 1 SOL to the fund using contribute
User A immediately calls withdraw and receives all the contributed SOL
User A can do this at any time, regardless of whether the deadline has passed or the funding goal has been met
Unlike other functions in the contract, withdraw has no deadline checks:
This issue is high severity as it undermines the core purpose of a time-bound crowdfunding contract and allows fund creators to potentially defraud contributors by withdrawing funds before the campaign period is complete.
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.