Secrypta Crypto security lab
RU / EN
Critical Vector: drain·NFT / setApprovalForAll 14 November 2026·5 min read

setApprovalForAll: one approval hands over your whole NFT collection

Abstract

This is the NFT analogue of an unlimited approve. ERC-721/1155 offer two very different ways to let someone move your NFTs: a scoped approve(operator, tokenId) over a single token, and a blanket setApprovalForAll(operator, true) - a standing right over your entire collection, present and future, until you revoke it. Marketplaces ask for the blanket one "to enable trading" - and a malicious operator sweeps the whole collection in a single transaction.

Two kinds of approval

approve(operator, tokenId) is a scoped right over exactly one token; it is cleared when that token transfers. setApprovalForAll(operator, true) is blanket: it covers every token in the collection at once, including ones you receive later, with no amount and no expiry, until you explicitly revoke. setApprovalForAll is to NFTs what approve(spender, max) is to ordinary tokens.

Why "for all" is so dangerous

One call makes isApprovedForAll(you, operator) equal to true for the whole collection: no per-token prompt, no amount, no expiry. After that the operator (not your wallet) can walk the tokens at any time - transferFrom(you, attacker, tokenId) for each - and the whole collection leaves in a single transaction. The size of the loss is set by the scope of the right you granted, not by anything you do at sweep time: a scoped approve caps the loss at one token, the blanket one at "the entire collection, forever".

How it works

Phishing disguised as "enable trading", "verify collection", "claim your reward" (often via a fake airdrop) asks for setApprovalForAll(attacker, true). The window looks ordinary - it is "just an approval". Later the operator sweeps all your NFTs in a single transaction. You never transferred them or confirmed each one.

How to stay safe

  • Prefer a scoped approval. Trading one NFT does not need a right over the whole collection. Where you can, choose approve(tokenId), not setApprovalForAll.
  • Be wary of setApprovalForAll to an unknown operator. Blanket collection authority where the action touches a single token is a red flag. Read the operator in the confirmation window.
  • Revoke unneeded operators. Review and remove setApprovalForAll grants at revoke.cash - through your own verified bookmark.
  • "Verify / unlock collection" is not always harmless. If such an action asks for setApprovalForAll, it is authority over all your NFTs, not a formality.

It has already happened

In 2022 the phishing-as-a-service operation Monkey Drainer stole around $16M: victims signed setApprovalForAll to a malicious operator, and whole collections were swept. On public data this is incident-level - the campaign's losses are documented, but the per-victim transactions are not fully public.

Want to see the difference live? Our testnet trainer has a lesson on approve-for-all: you compare a scoped and a blanket approval and see what setApprovalForAll actually hands over.

Sources ZeroTrace Labs (Monkey Drainer write-up).