burnFrom in BeatToken calls _burn(from, amount) directly without first calling _spendAllowance(from, msg.sender, amount). The ERC20 standard requires burnFrom to check that the caller has sufficient allowance from the token holder. Because this check is missing, the FestivalPass contract can burn any user's BEAT tokens without their explicit approval.
The require(msg.sender == festivalContract) gate restricts calling to the FestivalPass contract. Today, redeemMemorabilia only passes msg.sender as the from parameter:
So the current call path burns only the caller's own tokens. But the BeatToken contract itself has no defense. Any future code path in FestivalPass that calls burnFrom(someOtherAddress, amount) would silently burn that victim's tokens with zero approval. The standard burnFrom in OpenZeppelin's ERC20Burnable calls _spendAllowance before _burn for exactly this reason.
This is a latent vulnerability. The mechanism is broken in BeatToken itself. The only reason it doesn't cause immediate harm is that FestivalPass happens to always pass msg.sender. If the protocol adds a new function to FestivalPass, or if a new version of FestivalPass is deployed and set via setFestivalContract, the missing allowance check becomes exploitable without any change to BeatToken.
Likelihood:
Requires a new code path in FestivalPass (or a new FestivalPass contract) that calls burnFrom with an address other than msg.sender. Low probability in the current single-contract setup, but standard development practice is to add functions over time.
Impact:
Any user's BEAT balance can be burned without their consent. BEAT tokens are earned through attendance and used to redeem memorabilia NFTs. Burning a user's BEAT destroys their ability to claim memorabilia they earned through legitimate participation.
The test demonstrates that FestivalPass can burn any user's BEAT without that user ever granting an allowance to BeatToken or FestivalPass.
Output:
Add the standard allowance check before burning:
Then update redeemMemorabilia to have users approve BeatToken spending before redemption, or use OpenZeppelin's ERC20Burnable which includes this check by default.
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.