The configurePass function is intended to allow the organizer to update the price and maximum supply for a pass type (e.g., GENERAL, VIP) without affecting the number of passes already sold. This ensures the contract can adapt to changing event needs while maintaining accurate supply tracking.
However, the function resets the current supply (passSupply[passId]) to zero every time it’s called. This erases the record of sold passes, allowing purchases to exceed the intended maximum supply after reconfiguration.
Likelihood:
This issue triggers whenever the organizer calls configurePass to adjust a pass type’s price or maximum supply.
It impacts any pass type with prior sales, as the supply counter resets regardless of how many passes were sold.
Impact:
Overselling beyond the maximum supply, leading to overbooking and potential event chaos.
Financial or reputational damage if the organizer cannot honor all sold passes.
Below is an additional test to add to your test suite. It builds on your existing test by pushing the supply to the limit, reconfiguring the pass, and demonstrating the overselling issue with clear logs and assertions.
Remove the line that resets passSupply[passId] to preserve the current supply during reconfiguration.
This is not acceptable as high because any attack vectors related to organizer trying to milk ETH from participants is voided by the fact that the organizer is trusted.
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.