PREMINT | NFT Hack
What happened
On July 17, 2022, attackers injected malicious JavaScript into the PREMINT NFT allowlist site (premint.xyz). The script showed visitors a fake wallet-verification prompt that actually requested a setApprovalForAll approval, which let the attackers transfer the victims' NFTs. CertiK counted 314 NFTs taken by six attacker wallets, worth about 275 ETH (~$375,000), including Bored Ape Yacht Club, Otherside, Moonbirds Oddities and Goblintown pieces.
Premint later reported 321 NFTs from 28 wallets and roughly $500,000. Premint traced the injection to a flaw in an open-source image-upload tool for Amazon S3, promised to compensate victims at floor-price snapshots, and told users to revoke approvals.
How it happened
- The attacker abused a flaw in an open-source S3 image-upload tool used by PREMINT to bypass upload limits and folder restrictions and modify the site's JavaScript.
- The modified site loaded an extra script from a look-alike domain (
s3-redwood-labs-premint-xyz[.]com/cdn.min.js). - The script rewrote login and project pages to show a prompt asking users to verify wallet ownership; signing it granted the attacker
setApprovalForAllover NFT collections. - Attacker wallets used those approvals to transfer 314+ NFTs out of victim wallets, sold them, and routed proceeds through intermediary wallets toward Tornado Cash.
Protocol details
Evidence
- report Report cybernews.com
- report Premint Fingers Open Source Flaw For NFT Hack bankinfosecurity.com
- transaction etherscan.io transaction 0x7860…b4ab etherscan.io
- transaction etherscan.io transaction 0x81d4…25a8 etherscan.io
- transaction etherscan.io transaction 0xc705…0662 etherscan.io
- address etherscan.io address 0x0C97…18d0 etherscan.io
- address etherscan.io address 0x2873…b49d etherscan.io
- address etherscan.io address 0x4ed0…6ca1 etherscan.io
- address etherscan.io address 0x99ae…6bf4 etherscan.io
- address etherscan.io address 0xaab0…81f3 etherscan.io
- analysis PREMINT NFT Incident Analysis certik.com
- analysis Web Archive web.archive.org
- analysis DeFiLlama defillama.com
- analysis etherscan.io page txs etherscan.io
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.