The baseURI
(which defines the metadata location for NFTs) can be set to an invalid or malformed URI via setBaseUri
, leading to broken NFT metadata. The contract lacks validation to ensure baseURI
is a properly formatted URI.
The initial baseURI
is valid (IPFS-compliant).
There is No guarantee future updates will follow the same format.
The owner can set baseURI
to any arbitrary string (e.g., ""
, "invalid-uri"
, or a typo like "ipfs:/missing-slash"
).
All NFT metadata (accessed via tokenURI()
) will point to invalid locations.
The ERC721 tokenURI()
function constructs the metadata URL by appending the tokenId
to baseURI
as seen below:
Example: If baseURI
is set to "invalid"
, the metadata URL becomes "invalid1"
(for tokenId = 1
), which is unresolvable.
Marketplaces/wallets cannot display NFT artwork or attributes.
owner can accidentally set empty URI or typo in URI or non-standard URI.
Without URI validation, the contract’s metadata is vulnerable to human error or malicious actions by the owner, rendering NFTs unusable in practice.
Foundry
Add validation to setBaseUri
to enforce URI standards:
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.