The withdraw function updates the campaign state (is_active) after the transfer operation, risking multiple withdrawals if the transfer fails mid-execution
In program/src/instructions/withdraw.rs, the is_active flag is set to false after the transfer instruction succeeds. If the transfer fails (e.g., due to insufficient funds or network issues) but the transaction partially executes, the campaign could remain active, allowing the owner to attempt withdrawal again
An attacker or owner could potentially withdraw funds multiple times if the transfer operation fails inconsistently, draining more than the intended total_contributed amount. This undermines the campaign’s financial integrity and contributor trust.
MR
Update the state before the transfer and ensure atomicity
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.