The protocol mints the token as an representation of the nft on the blockchain which uses _mint()
function which is not recommended and does not have proper precautions to make sure the nft
isn't lost.
The vulnerable line of code can be find below, the function checks if the nft has been escrowed or not, meaning if the asset is being hold by escrow contract if not it calls mintFromBridge()
.
As you can notice there are no checks to see if the receiver of the NFT is a valid receiver which can lead the NFT to be stuck.
NFT can be stuck and a loss to the owner
Manual
Use _safeMint()
instead
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.