name and profileImage are inserted directly into JSON.
A user can include quotes or JSON control characters to break or manipulate the metadata returned by tokenURI(). This is not a protocol-fund theft issue, but it can affect frontends/indexers.
Likelihood:
High. Exploitable by any user at mint with zero preconditions — just pass a crafted name or profileImage string containing ", }, or ,
Impact:
Medium. No funds at risk. However a malicious user can break metadata parsing for frontends and NFT indexers (OpenSea, etc.), spoof or overwrite display fields, or inject unexpected keys — corrupting how any matched user's profile is rendered.
tokenURI() builds a JSON string by directly concatenating user-supplied name and profileImage values. There is no sanitisation. A user mints with a name containing " and extra JSON fields — the resulting string is valid JSON that a parser will read differently from what the contract intended.
Write this new test contract and Ran with command: forge test --match-path JSONInjectionPoC.t.sol -vvvv
Validate name and profileImage inputs at mint time — reject any string containing JSON control characters.
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.