Bitwise shift collision in encodeTokenId allows token ID ambiguity
The FestivalPass::encodeTokenId function combines collectionId and itemId using a left bit shift followed by addition. However, this implemenmtation does not validate that itemId fits within the expected bit range after shifting collectionId. Without overflow checks different pairs can produce the same encoded token ID, causing collisions and breaking token ID uniqueness guarantees.
Likelihood: Low
Although it is easy to cause collisions, the itemId is managed by the system and needs a very large itemId.
Impact: Medium
Token IDs may collide across collections.
Apply strict bounds to prevent silent overflowing.
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.