Submitted by adeolu
Because token_uri value is not sanitized and is arbitrary/provided by a user, a malicious user can provide a token uri which may have " or , or simply a fake url which points to a different higher value rental property in order to phish unsuspecting users.
Lets say a malicious user wants to make a rental that impersonates another high value rental, the attacker can set his own tokens uri to be an exact copy of the high value rental and display attributes/json metadata which is the same. Unsuspecting users might then be tricked into renting from the wrong landlord or buying the wrong rental, because the frontend will display same rental property image and same attributes. All this is possible because token_uri is arbitrary.
To prevent your project from becoming a hotbed for phishing, the token_uri should not be arbitrary, it can be generated by the code. There are a few similar implementations like this here. The token uri is constructed into a json string and its then modified into a base64 json.
Dont make token uri arbitrary, generate it in code. Ensure your generation logic rejects strings that contain " and , as these can also be exploited by attackers to do json injection of false fields.
Context
blockchainstar12 (Coded Estate) acknowledged
Lambda (judge) commented:
nnez (warden) commented:
adeolu (warden) commented:
nnez (warden) commented:
Lambda (judge) commented:
nnez (warden) commented:
Lambda (judge) commented:
