BeatToken.burnFrom(from, amount) destroys from's balance with only a msg.sender == festivalContract check and no ERC20 allowance. It is therefore not "burn from with permission" — it is "burn anyone's balance." It is safe today only because the sole caller, redeemMemorabilia, always passes msg.sender as from. Any change to the festival contract that passes a different from (or a compromised/upgraded festival contract) can burn any holder's tokens without consent.
The name and signature imply an ERC20Burnable.burnFrom that checks allowance, but the implementation bypasses allowance entirely. The current caller is correct:
Likelihood: Low. There is no current code path that passes a third-party from, so the bug is latent. It becomes live the moment a new festival function redeems on behalf of a user, or the festival contract is replaced/compromised.
Impact: If triggered, arbitrary holders' BEAT can be burned, destroying value with no user approval. Latent today; flag it so the invariant is not accidentally violated by future code.
The test deploys a MockFestival and makes it the festivalContract. It then burns a victim's balance with no approval from the victim, proving the callee performs no allowance check. (Marked latent: in production the festival contract is trusted and currently only burns msg.sender.)
Implement the conventional allowance-preserving burn, or have the festival contract burn from msg.sender directly. If on-behalf-of burning is intended, require from == msg.sender or an explicit allowance.
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.