The FestivalPass::withdraw function currently takes in a target address for funds to be withdrawn to. This address is not validated at all, meaning if the owner makes a mistake when calling the function and passes in the wrong target, all funds will be sent to the wrong address and lost or burnt.
Likelihood:
This will occur when the owner calls the FestivalPass::withdraw function and passes in the incorrect target address.
Impact:
Funds will be withdrawn to wrong address and will be lost or burnt.
Passes are configured by the organizer
Users buy passes, increasing the ETH balance of the FestivalPass contract
Owner calls withdraw and passes in the zero address
Funds are sent to the zero address and burnt
Add the following test to the FestivalPass.t.sol file.
The recommended mitigation for this is adding a treasuryAddress variable with a setTreasuryAddress function callable by the owner. This function will contain a zero address check. This allows the owner to set the treasuryAddress prior, and if they make a mistake they can simply update the treasuryAddress.
Note: Make sure to add the new event TreasuryAddressUpdated(address newTreasuryAddress) event to the IFestivalPass.sol interface.
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.