Milk Sad (CVE-2023-39910): the bx seed disaster

A command-line tool featured in the book Mastering Bitcoin generated "random" seeds from the clock — reducing any wallet it created to 4.3 billion guessable possibilities.

Exploited: Jun–Jul 2023 Wallets affected: 2,600+ Losses: ~$900k

How it worked

The bx seed command in Libbitcoin Explorer 3.0.0–3.6.0 generated seed entropy by seeding a standard 32-bit MT19937 Mersenne Twister with the current system time. Regardless of how long the resulting mnemonic looked, its true entropy was only 232 ≈ 4.3 billion possibilities — brute-forceable on a single laptop in days. The vulnerability's name comes from the first mnemonic the broken generator produces: "milk sad…".

The impact

Researchers confirmed the flaw affected 2,600+ wallets across multiple chains and tied it to real thefts totalling roughly $900k. Because bx was a respected, widely-cited tool, victims had no reason to suspect their carefully-backed-up seed phrases were worthless.

The defense

Any wallet created with a vulnerable bx seed must be abandoned and its funds moved. More broadly: never trust a seed generator that uses a non-cryptographic PRNG (like a plain Mersenne Twister) or seeds from the clock.

The Milk Sad disclosure → · CVE-2023-39910

▶ Try the Libbitcoin mode in the game

← Back to all attack vectors