← Back to Hack Archive

Mt. Gox Hack

February 24, 2014$450 millionHot Wallet CompromiseBitcoin

The Story

On February 24, 2014, Mt. Gox, once the world's largest Bitcoin exchange handling over 70% of all Bitcoin transactions, abruptly suspended trading and closed its website. Shortly after, the company filed for bankruptcy, announcing that approximately 850,000 BTC (750,000 belonging to customers and 100,000 belonging to the exchange) had been stolen, valued at around $450 million at the time.

The Tokyo-based exchange, which had begun as a trading card platform ("Magic: The Gathering Online eXchange"), had been the victim of ongoing thefts that had gone undetected for years. Later investigations revealed that hackers had been siphoning Bitcoin from the exchange's hot wallet as early as 2011.

In the years following the collapse, a trustee recovered about 200,000 BTC, which has been the subject of a complex civil rehabilitation process aimed at partially repaying affected users. The Mt. Gox incident remains a defining moment in Bitcoin history, profoundly shaping exchange security practices and regulatory approaches.

Technical Analysis

The Mt. Gox breach was not a single attack but a series of security failures and ongoing thefts over several years. While the full technical details were never completely disclosed, several key vulnerabilities have been identified:

  1. Transaction Malleability Exploitation: Attackers exploited a Bitcoin protocol flaw called transaction malleability to make it appear that withdrawals had failed when they had actually succeeded, triggering duplicate withdrawals.

  2. Hot Wallet Private Key Theft: Mt. Gox reportedly stored a significant portion of Bitcoin in hot wallets (internet-connected) with inadequate security, leading to private key theft.

  3. Lack of Version Control and Testing: The exchange allegedly operated without proper version control systems, allowing untested code to run in production environments.

A simplified example of the transaction malleability issue:

// Original transaction
{
  "txid": "abc123...",
  "inputs": [...],
  "outputs": [
    {"address": "customer_address", "amount": 10}
  ],
  "signature": "xyz789..."
}

// Malleable transaction (same inputs/outputs but modified signature)
{
  "txid": "def456...", // Different because signature changed
  "inputs": [...],
  "outputs": [
    {"address": "customer_address", "amount": 10}
  ],
  "signature": "modified_signature"
}

The attacker could broadcast the modified transaction, which would be accepted by the network but have a different transaction ID. When Mt. Gox's systems didn't see the original transaction ID confirm, they might process the withdrawal again.

Lessons Learned

  1. Cold storage should be used for the vast majority of cryptocurrency holdings
  2. Regular security audits and penetration testing are essential for exchanges
  3. Proper accounting and reconciliation procedures must be implemented
  4. Multi-signature technology should be employed for withdrawal authorization
  5. Automated transaction monitoring systems are needed to detect suspicious activities