The withdraw
function does not properly enforce access control, allowing any user to withdraw funds from any fund. This means an attacker could steal funds from other campaigns by specifying a fund they do not own.
If exploited, this vulnerability could lead to loss of user funds, donor fraud, and reduced trust in the crowdfunding platform.
Vulnerable code:
Issue:
There is no verification to ensure that only the fund creator can withdraw funds.
An attacker can pass any fund's address as input and steal funds from other campaigns
** Complete loss of funds** for affected fundraisers.
Malicious actors can drain any fund without ownership verification.
Loss of trust in the crowdfunding platform, leading to lower user adoption.
There are enough security checks in `withdraw` function. Anchor enforces that creator must sign the transaction. And the `has_one = creator` ensures that the fund’s creator matches the provided creator account.
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.