Mt. Gox Hack
What happened
On October 28, 2011, Mt. Gox destroyed 2,609 BTC through a bug in its own wallet software. About two dozen withdrawal transactions, confirmed in Bitcoin block 150,951, sent coins to output scripts that can never be satisfied, so the bitcoins are permanently unspendable. The coins were worth roughly $8,000 at the time.
No outside attacker was involved: the loss came from Mt. Gox building malformed transactions. The Quadriga Initiative case study reports that Mt. Gox absorbed the loss rather than passing it to customers.
How it happened
- Mt. Gox's software built withdrawal transactions with the script
OP_DUP OP_HASH160 0 OP_EQUALVERIFY OP_CHECKSIG. In a normal pay-to-address script, the0would be the 20-byte hash of the recipient's public key. - The
0byte isOP_0, which pushes an empty byte array. When anyone tries to spend the output, the hash of their public key has to equal that empty array, which is impossible, soOP_EQUALVERIFYalways fails. - Bitcoin nodes accepted the transactions because an output script is not checked for spendability when it is created. About two dozen of them were mined in block 150,951, locking 2,609 BTC for good.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.