Low
High
tokenURI() inserts user-controlled strings into JSON metadata without escaping special characters, allowing malformed NFT metadata.
The intended behavior is that tokenURI() should always return valid JSON metadata so wallets, marketplaces, and indexers can parse and display the NFT profile correctly.
Instead, profileName and imageURI are concatenated directly into the JSON string without escaping reserved characters such as " and \. As a result, a user can mint a profile whose metadata becomes invalid JSON and breaks downstream parsing or
rendering.
Likelihood:
This occurs whenever a user mints a profile using unescaped reserved JSON characters in name or profileImage.
The issue is straightforward to trigger because both affected fields are fully user-controlled.
Impact:
The affected NFT metadata can become unparsable for wallets, marketplaces, and indexers.
This degrades NFT usability and display correctness without directly putting funds at risk.
The following test shows that including unescaped quote characters in user-controlled profile fields causes tokenURI() to return malformed JSON metadata.
Validate or sanitize user-controlled strings before embedding them into JSON metadata. At minimum, reject characters that can break JSON string fields, such as " and \, before storing profile data.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.