Skip to content
medium Token Standards No SWC entry CWE-393

ERC-721/1155 Missing Receiver Validation (Safe Transfer)

SAFE-0054 Token Standards Checked automatically by the scanner
1

What goes wrong

Using transferFrom instead of safeTransferFrom (or skipping onERC721Received checks) can send NFTs to contracts that cannot handle them, permanently locking the asset; conversely, blindly trusting the hook re-enables reentrancy.

2

How to fix it

the pattern that is safe
nft.safeTransferFrom(address(this), to, id); // checks receiver; guard caller
Use safe transfers but guard against hook reentrancy.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0054 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs