First Flight #12: Kitty Connect

First Flight #12: Kitty Connect
Beginner FriendlyFoundryNFTGameFi
100 EXP
View results
Submission Details
Severity: high
Valid

s_ownerToCatsTokenId

Summary

s_ownerToCatsTokenId mapping is used for mapping the NFT owners to NFT TokenIds. It is updated in the mintCatToNewOwner() function.

Vulnerability Details

But it's not updated in safeTransferFrom() function. The transferred tokenId should be removed from this mapping.

Impact

Although require statements in bridgeNftToAnotherChain and safeTransferFrom functions prevents the NFT to be transferred or minted more than once, the impact is related to the mapping itself and catInfo.idx

Tools Used

foundry
manual review

Recommendations

It's recommended to remove the correct tokenId from s_ownerToCatsTokenId

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Improper token ownership update in `_updateOwnershipInfo`

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.