set_deadline() is designed to be called exclusively by the campaign creator to configure the campaign end time after the fund is created.
The function has no ownership or signer validation — it does not verify that the caller is the creator of the specific campaign being modified. Any arbitrary wallet can call it and overwrite the deadline of any campaign to any value.
Likelihood: High
No authentication of any kind — any wallet on the network can call this function targeting any fund PDA at any time
Fund PDAs are publicly derivable from the campaign name and creator pubkey — no private information needed to compute the target
Impact: High
Attacker sets any campaign deadline to 0 or a past timestamp — immediately unblocking refunds and freezing new contributions
Attacker sets deadline to u64::MAX — locking all contributors out of refunds for the entire lifetime of the program
Campaign creators lose all control over their own campaigns with no recovery path
The test below shows an attacker wallet — one that has never interacted with the campaign — successfully overwriting the deadline of a creator's campaign to zero. The transaction succeeds because there is no constraint checking that the signer owns the fund. The creator's deadline setting is silently overwritten.
The fix requires two changes. First, add has_one = creator to the #[account] constraint on the Fund account — this is an Anchor built-in that automatically validates the creator field in the Fund struct matches the signer passed in. Second, add an explicit require! as a defense-in-depth check. Together these ensure only the campaign's actual creator can modify its deadline.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.