Unlock Protocol Hack
What happened
On April 21, 2023, an attacker drained a little over 20 ETH from Unlock Protocol on Ethereum. The main Unlock contract exposed postLockUpgrade() without checking who called it. The attacker used it to register their own contract as a deployed lock, which let that contract pass the onlyFromDeployedLock() check on recordKeyPurchase(). Only real Unlock locks are meant to call that function.
The exploiter contract 0xac08f1af4131480cc41ae89c80a63e578a152e84 then made about 70 transactions that day, sending WETH/ETH back to the attacker. About 16 ETH was moved to Tornado Cash through the accomplice address 0x3a6833329fc1bd0b867413045c5f6da3cb0e3c0e. ImmuneBytes reported that UDT's price fell more than 82% after the hack before recovering to a 37% drop.
Exploiter: Address 0x43ee…bb71
Exploiter contract: Address 0xac08…2e84
Setup transaction: Tx 0x4ac4…3ef6
How it happened
- The exploiter
0x43ee...bb71deployed attack contract0xac08...2e84. - In transaction
0x4ac413c3...3ef6(03:22 UTC), the attack contract calledpostLockUpgrade()on the Unlock implementation0xdcb2...6b93. The function did not verify its caller, so it setlocks[<0xac08>].deployedtotrue. - Now registered as a deployed lock, the attack contract passed the
onlyFromDeployedLock()modifier onrecordKeyPurchase(). - The attacker ran the attack contract about 70 times on April 21, collecting a little over 20 ETH in total.
- About 16 ETH was sent to Tornado Cash through accomplice address
0x3a68...3c0e.
Protocol details
Evidence
- report @AnciliaInc incident report twitter.com
- transaction Etherscan transaction 0x4ac413c3...3ef6 etherscan.io
- address Etherscan: exploiter contract 0xAc08f1Af...2e84 etherscan.io
- address etherscan.io address 0x43ee…bb71 etherscan.io
- analysis Unlock Protocol Hack Analysis — Improper Caller Validation (SolidityScan) blog.solidityscan.com
- analysis ImmuneBytes LinkedIn post on the UDT / Unlock hack linkedin.com
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.