Coldcard RNG Flaw Leads to Tens of Millions in Bitcoin Theft
A five-year firmware bug in high-security hardware wallets allowed an attacker to recalculate private keys and sweep funds from hundreds of addresses.
A critical firmware vulnerability in Coldcard hardware wallets has resulted in the theft of millions of dollars in Bitcoin after a latent bug compromised the devices' random number generation. The flaw, which existed for five years, allowed an attacker to predict private keys and drain single-signature wallets in a rapid series of transactions on July 30, 2026.
The vulnerability stemmed from a preprocessor directive introduced in a March 2021 firmware update. A macro check verified the existence of a configuration macro but failed to verify its value, which was set to zero. This logic error effectively disabled the hardware random number generator (RNG), forcing the device to fall back to a predictable software pseudo-RNG known as Yasmarang. This software fallback relied on non-cryptographic entropy sources, such as system tick counters and device IDs, creating seeds with significantly lower entropy than required for secure custody.
The Impact of the Sweep
The failure of the RNG allowed an attacker to recalculate the private keys of affected users. The scale of the theft varies by analysis: Chainalysis reports approximately 594 BTC (~$38 million) swept from roughly 500 addresses, while Galaxy Research estimates the loss at 1,082 BTC (~$70.2 million) across 1,196 addresses. Because the flaw occurred during the initial seed generation process, the vulnerability was "upstream of anything they could inspect."
Affected hardware includes the Mk3 model (specifically firmware versions 4.0.1 through 4.1.9), as well as the Mk4, Mk5, and Q models running versions older than the company's fixed releases.
Implementation Risk in Self-Custody
Coldcard is marketed as a high-security, air-gapped Bitcoin-only wallet, and this incident highlights a severe "implementation risk" in the self-custody ecosystem. The event proves that air-gapping a device provides no protection if the underlying key generation is flawed. Because the weakness occurs at the moment the seed is created, the vulnerability is permanent for those specific wallets; a firmware update can prevent the bug in new devices but cannot recover funds from seeds already generated with low entropy.
Industry experts suggest this underscores the necessity of "defense in depth." To mitigate such risks, users are encouraged to use external entropy sources, such as manual dice rolls for seed generation, strong passphrases, or multisig configurations to ensure that no single point of failure—including the hardware manufacturer's code—can lead to a total loss of funds.
Looking Ahead
Users of the Mk3, Mk4, Mk5, and Q models are urged to verify their firmware versions and migrate funds to new wallets generated with updated software. While the technical cause of the bug is confirmed, the full extent of the attacker's capabilities and whether AI-assisted code review played a role in discovering the latent flaw remain subjects of industry discussion.