The KittyConnect::_updateOwnershipInfo
function does not properly remove the tokenId
from the previous owner's token list, leading to a potential vulnerability where the previous owner can still interact with the NFT even after transferring it.
The KittyConnect::_updateOwnershipInfo
function is used to update the ownership mapping when a cat NFT is transferred to a new owner. However, it only adds the tokenId
to the new owner's list and does not remove it from the previous owner's list.
This can allow the previous owner to still call onlyOwner
functions on the NFT contract, effectively retaining control over it even after transferring it away
This vulnerability allows the previous owner of an NFT to retain control over it after transferring it away. They can call restricted onlyOwner functions, modify metadata, or transfer it again.
This can lead to loss of funds or assets for the new owner who assumes they have full control over the NFT after transfer.
Manual review
Foundry Test
Update KittyConnect::_updateOwnershipInfo
to remove the tokenId from the previous owner:
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.