The function tokenURI will return URI for non-existent tokens.
The tokenURI function uses tokenIdToRarity mapping to identify the rarity of an NFT and return the corresponding URI for the token. However, the default value for mapping is 0, which equals COMMON rarity.
Medium
Manual analysis
Add the require check for the existence of NFT to tokenURI function.
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.