The buyPass function is vulnerable to a reentrancy attack, since the CEI pattern is not respected. This would allow the attacker to increase the maximum limit of the collection.
Likelihood:
As soon as the attacker wishes to buy tokens, as long as the reentrancy attack exceeds the maximum supply.
Impact:
The max supply of the collection can be exceed without any limit
This would unbalance the collection, leading to a decrease in rarity.
To realize the reentrancy attack, you need to implement a contract that allows the receiving of ERC1155 tokens (with ERC1155Holder.sol from OpenZeppelin for example).
The function called is onERC1155Received(), so you need to implement it.
The attack can then proceed as follows :
To mitigate this issue, you need to respect the CEI pattern :
first increment passSupply of the collection id
then mint the token
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.