Vulnerability · Breaking

Coinkite postmortem: COLDCARD built wallet seeds from MicroPython’s software PRNG for five years; Galaxy counts 1,778.84 BTC (~$107M) stolen

A firmware flag switched off COLDCARD’s hardware RNG and a guard in libNgU let it through, so seeds from 2021 to July 2026 carried about 40 to 72 bits of entropy instead of 128. Thieves rebuilt keys offline. At least 15 reviews, including an AI-assisted one, missed it.

Nov 24, 2026 · 3 min read

What’s new. Coinkite published its full postmortem on the COLDCARD seed-generation failure, an 18-page report dated Nov 23 and modeled on an NTSB accident report. From March 29, 2021 through July 30, 2026, COLDCARD firmware generated wallet seeds with MicroPython’s Yasmarang software pseudo-random number generator instead of the STM32 hardware RNG it was designed to use (per Coinkite).

How it broke. The firmware configuration set MICROPY_HW_ENABLE_RNG to zero. A configuration guard in the pinned libNgU code was supposed to catch that and didn’t, so rng_get() resolved to MicroPython’s software generator. Nothing failed at runtime: both backends exposed the same interface, the hardware RNG code was present in the binary, and the device produced well-formed seed words. Seed output was hashed before use, so it looked random. Coinkite estimates affected seeds had roughly 40 bits of effective entropy on Mk2/Mk3 and roughly 72 bits on Mk4, Mk5 and Q, against a 128-bit target.

The theft. Starting July 29, attackers regenerated private keys for weak seeds offline and drained them. No device was remotely accessed or taken over. Coinkite found the defect July 30 and shipped fixed firmware July 31. Galaxy Research counted 1,778.84 BTC stolen from more than 8,600 addresses, about $107 million at today’s price; Galaxy put the loss above $115 million at prices when the coins were taken (per Bitcoin Magazine). Coinkite says it has about 300 loss-related tickets tied to 242 accounts as of Nov 18, roughly 0.21% of its estimated user base, and that the real number is likely higher because the wallet is non-custodial. Who found and used the flaw: Undisclosed; law enforcement is investigating. Compensation: no decision yet.

Everyone missed it. Coinkite documents at least 15 independent review and research efforts from 2021 to 2026, including two paid third-party reviews, and source code was public the whole time. An AI-assisted review with the OpenAI Cybersecurity Harness from May 1 to June 26, 2026 produced 85 candidate findings and did not catch this one. The report calls AI-assisted discovery by the attacker “a plausible hypothesis, not an attribution” (per Bitcoin Magazine).

What we’d do this morning. If you ship or buy anything that generates keys on embedded hardware (HSM-adjacent appliances, IoT provisioning, smart cards, wallets): don’t accept “the TRNG driver is in the build” as evidence. Ask for a build-time or boot-time check that the keygen path actually reaches the hardware source, the control Coinkite added after the fact. Grep your own configs for RNG enable flags and fallback paths in MicroPython, Zephyr or vendor HALs. Statistical tests on hashed output won’t catch a weak seed source, so test the source. And for COLDCARD owners: a firmware update doesn’t repair a seed made on affected firmware. Install verified fixed firmware, make a new seed, move the coins. Seeds made with at least 50 fair, private dice rolls were not weakened.

Fixed releases. Mk2/Mk3: 4.2.0 or later. Mk4/Mk5 standard: 5.6.0 or later (current 5.6.3). Q standard: 1.5.0Q or later (current 1.5.3Q). Edge: 6.6.0X / 6.6.0QX or later. Keylabs’ Oct 15 review found the defect fully closed in Mk5 5.6.2/5.6.3 and Q 1.5.2Q/1.5.3Q, within its stated scope; that review didn’t cover Edge (per Coinkite and Bitcoin Magazine).

Why it matters. This is a five-year RNG bug in one of the most-reviewed open-source firmware projects in Bitcoin, and it cost users nine figures. A dependency guard that checks whether a macro is defined instead of what it is set to is a supply-chain control failure any embedded team could ship.

Sources