The FestivalPass contract performs external calls to the BeatToken contract’s mint() and burnFrom() functions inside buyPass() and redeemMemorabilia(). These functions are public and currently lack reentrancy protection.
If beatToken is ever set to a malicious contract, an attacker might trigger recursive calls before internal state updates (such as supply limits or ETH transfers) are finalized. This potentially can result in over-minting of NFTs, bypassing limits, or draining funds.
Likelihood:
Happens if beatToken is set to a malicious or upgradeable contract.
Could occur in testing, misconfiguration, or future development.
Impact:
Bypass of pass/memorabilia limits
Draining of ETH via repeated execution before supply limits are hit
State inconsistency or abuse of reward distribution logic
Explanation:
This contract simulates an attacker replacing the BeatToken contract with a malicious version. When mint() is called, it reentrantly calls buyPass() before the state in FestivalPass has finished updating. This allows bypassing logic like supply limits, or potentially draining ETH if left unchecked.
Explanation:
Using OpenZeppelin’s ReentrancyGuard ensures that no external contract can call back into a vulnerable function before the original execution completes. This helps protect any function that interacts with external contracts, like mint() and burnFrom(), from being exploited through reentrancy.
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.