The COLDCARD RNG Vulnerability: How a “Random” Bitcoin Seed Became Guessable

D. Rose · 15 August 2026 · Updated 18 August 2026 · 10 min

How a firmware integration mistake pushed COLDCARD wallet generation onto a deterministic software PRNG, why the public blockchain let attackers verify guesses for free, and why a firmware update cannot repair a seed that was already generated.

A firmware integration mistake made affected COLDCARD hardware wallets generate Bitcoin seeds from a deterministic software generator instead of the hardware random-number generator they were meant to use, and Block's analysis, published July 30, 2026, reported that active exploitation was already underway. Even a device that stayed offline, with a seed that never left it, would not have helped: an attacker who can reconstruct a secret never has to extract it, and a firmware update cannot repair a seed that already exists.

The 30-Second Version

COLDCARD intended to seed wallets from a hardware True Random Number Generator. A build mistake introduced around the 2021 code migration sent wallet generation to MicroPython's Yasmarang, a deterministic software generator whose important inputs on Mk2/Mk3 came from device and timing state. The seeds looked normal and worked normally, but they came from a much smaller family of wallets than a real 24-word seed implies. An attacker could potentially generate that family offline, derive each candidate's addresses, and let the public blockchain say which ones hold Bitcoin. COLDCARD estimates around 40 bits of effective search space on Mk2/Mk3 and approximately 72 bits on Mk4, Q and Mk5, under its own attack assumptions. Fixed firmware protects future seeds only; an affected seed has to be replaced.

Part 1: What Happened and What It Cost

Block published its analysis on July 30, 2026, saying that active exploitation was underway following reports from COLDCARD users. Bitcoin Optech reported the following day that users had discovered unauthorized transactions from COLDCARD-generated wallets and that estimated losses had already exceeded 1,000 BTC at the time of publication. Later blockchain analysis from TRM Labs attributed multiple theft waves totaling roughly 1,816 BTC, valued around $116 million at the time of its August 5 report. That is an analyst estimate; attribution and on-chain clustering can evolve, so it is not a final total.

Nothing in Bitcoin was cracked. The attackers did not break SHA-256 or secp256k1, and they found no shortcut for turning an address back into a private key. They attacked how the secret was originally chosen.

Part 2: Looking Random Is Not Being Unpredictable

Cryptography needs numbers that nobody else could predict or reproduce; how messy a number looks is beside the point. A hardware TRNG gets its bits by measuring physical electrical behavior, and COLDCARD devices contain hardware intended to provide that. A PRNG is an algorithm: give it a starting state and it produces a random-looking stream, give it the same state again and it produces the same stream again. That is what deterministic means.

A PRNG is not automatically insecure. Cryptographically secure PRNGs are designed so that knowing previous outputs doesn't make future outputs practically predictable, and modern cryptography uses them routinely. The COLDCARD problem was the particular generator path, how it was initialized, and how much secure entropy reached it.

Entropy is unpredictability: the number of unknown states an attacker would have to search. password1 and jN8#vQ2!fzP6$LmX fit the same password field, and their appearance as strings says nothing about the size of the search space behind them.

Seed phrases work the same way. Under BIP-39, a 24-word mnemonic encodes 256 bits of initial entropy plus checksum information. The words are an encoding; the security comes from the randomness behind them. Software that picked one number between 1 and 100 and turned it into 24 words would produce something that looks exactly like a real seed, and an attacker would have 100 candidates to test. Hashing afterward does not help. Block noted that hashing the RNG output can make the bytes look uniformly distributed, but hashing cannot increase the number of possible starting states: 100 possible inputs through SHA-256 give at most 100 possible outputs.

Part 3: A Setting That Was Defined but Not Enabled

COLDCARD describes the bug as a link-time integration error rather than a hardware TRNG failure. Block traced the earlier wallet-generation code to a function using the board's hardware RNG directly. Around the March 2021 migration to libNgU, that call changed to something effectively resembling ngu.random.bytes(32), on the expectation that the path would reach the appropriate hardware implementation. It didn't. The build carried this setting:

MICROPY_HW_ENABLE_RNG = 0

The intent was to keep MicroPython's RNG out because COLDCARD provided its own. Another component checked whether the setting was defined rather than whether it was enabled, and a value of 0 is still defined. The check passed, the build succeeded, and the wrong RNG implementation was linked into the path used by wallet generation. The hardware, the compiler and the cryptographic algorithm largely did what they were programmed to do. They were connected incorrectly.

The fallback was Yasmarang, a small, fast, non-cryptographic PRNG. Block's analysis shows it initialized from the MCU UID and timer-related registers. Those values change, and a device UID may be unique, but changing and unique are different properties from secret and unpredictable.

Determinism does not mean every COLDCARD generated the same seed. It means an attacker who can reproduce or sufficiently constrain the starting conditions (UID, timer, RTC, previous RNG activity) can reproduce the stream, and the search shrinks from essentially every possible seed to the outputs this known algorithm could have produced under plausible starting conditions. Block cautions that this doesn't mean every attacker can instantly recover every seed: practical cost depends on how well those conditions can be constrained.

Part 4: The Blockchain Checks the Guesses

The attacker does not try random words. The guessing happens over possible RNG states: reproduce the buggy generator, produce candidate entropy, convert it into the same wallet structure COLDCARD would, derive keys and addresses. All of it runs offline; you don't register a Bitcoin address with Bitcoin. Then:

Candidate seed
     ↓
derive Bitcoin address
     ↓
look at public blockchain
     ↓
Does this address contain Bitcoin?
     ↓
YES → candidate is correct
NO  → try another

Block calls public wallet information a candidate-validation oracle: something that lets an attacker determine whether a candidate seed is correct. Bitcoin provides it for free. An ordinary address does not say which device or firmware created it, so the attacker does not need a list of COLDCARD owners. The stronger approach runs in reverse: generate the wallets the vulnerable RNG could produce and look for their addresses on the blockchain, doing much of the checking without interacting with victims at all.

Bitcoin cannot tell a weakly generated key from a strong one. A valid private key generated with terrible randomness is still a valid private key, and its signatures are legitimate, the way a server accepts 123456 as a working password.

An air gap would not have helped. Hardware wallets are designed around protecting secrets after they exist, by keeping them inside the device. When the key was predictable from the beginning, the private key never has to leave the COLDCARD: the attacker creates their own copy.

Part 5: About 40 Bits on Older Devices, About 72 on Newer Ones

On affected Mk2/Mk3 firmware, the software RNG path did not receive the cryptographically secure reseeding that later models added. COLDCARD's current technical assessment estimates an effective search space around 40 bits under its stated attack assumptions. 2^40 is about 1.1 trillion, which sounds enormous until it sits beside 2^128, about 340 undecillion. Those are not remotely comparable security levels.

Mk4, Q and Mk5 added randomness from secure elements. Block found that the secure-element data was hashed and only four bytes, 32 bits, were passed into the relevant reseed() operation, replacing one state word in Yasmarang. COLDCARD's broader attack model estimates approximately 72 bits of effective entropy for affected Mk4, Q and Mk5 seeds, rather than the intended security target.

The 32 and the 72 describe different pieces of the attack. Block says that once the fallback RNG state and call history are fixed, the secure-element reseed creates at most 2^32 securely distinguished output streams: the secure unknown that one operation introduces. COLDCARD's figure is a broader estimate of attack complexity under its assumptions, including other state an attacker may need to search or constrain. Both organizations caution that real-world recovery cost depends on exactly what the attacker knows about a particular device's state and history.

Seventy-two bits is much stronger than 40 and substantially weaker than the expected margin.

Part 6: Why Review and Testing Missed It

The output looked fine. A deterministic PRNG can produce numbers that look extremely random statistically, and it normally produces different consecutive outputs. Block notes that COLDCARD had a basic health check designed to catch obvious repeated RNG values. A test like output1 != output2 passes while the stream stays predictable to someone who knows the state.

COLDCARD's firmware source was publicly available, and the issue survived for years anyway. The behavior crossed COLDCARD code, libNgU, MicroPython, compiler configuration and linker symbol resolution before reaching the function that actually ran. A reviewer could inspect the hardware RNG implementation, find it sound, and still not have shown that creating a new wallet reaches it at runtime. COLDCARD says prior review verified that the intended hardware RNG code was present, but did not verify the complete end-to-end symbol resolution from wallet generation through the relevant submodules.

Part 7: Which Seeds Are Affected, and What Fixes Them

As of August 15, 2026, COLDCARD's current security status lists these minimum fixed releases:

Device / trackAffected seed generationMinimum fixed firmware
Mk2 / Mk34.0.1 through 4.1.94.2.0+
Mk4 / Mk5 StandardBefore 5.6.05.6.0+
Q StandardBefore 1.5.0Q1.5.0Q+
Mk4 / Mk5 EdgeBefore 6.6.0X6.6.0X+
Q EdgeBefore 6.6.0QX6.6.0QX+

What matters is the firmware that generated the seed, not which firmware is installed today. A seed generated elsewhere and imported into a COLDCARD isn't weakened merely because a COLDCARD held it. TAPSIGNER, OPENDIME and SATSCARD use different codebases and are not listed as affected.

Dice rolls may exempt an affected seed. According to COLDCARD's advisory, if the Add Dice Rolls workflow included at least 50 fair, independent, private dice rolls, those rolls contributed at least 128 bits of independent entropy; with 99 or more qualifying rolls, approximately 256 bits. All three words carry weight. Typing 1 repeatedly is not entropy, and neither are rolls an attacker has recorded.

Updating the firmware does not fix the seed. The current COLDCARD security status says the fixed firmware corrects future seed generation but does not repair existing affected seeds. A seed's randomness is whatever it was when the seed was created.

Moving the words to Trezor, Ledger, Sparrow or another wallet changes only where the seed is stored. Block calls this out specifically: an affected seed remains affected after export or migration to another wallet, because the weakness belongs to the seed itself.

A strong, unique BIP-39 passphrase produces a different wallet, so an attacker who recovers the weak seed still faces a second secret. COLDCARD's guidance calls that an additional barrier and warns that it does not repair the compromised seed; users with affected seeds are still instructed to migrate.

The repair is a brand-new seed from a fixed RNG implementation, a brand-new wallet, and moving the Bitcoin to it.

The Big Misconceptions

“Attackers guessed all possible 24-word phrases.”

They exploited structure in how affected devices generated the underlying randomness; the seed phrase falls out of the process.

“The hardware random-number generator broke.”

The published analysis indicates the intended hardware RNG existed and the code to use it was in the firmware; an integration and build issue sent wallet generation down the wrong software path.

“I had a PIN.”

The COLDCARD PIN protects access to the device and adds no entropy to the wallet. A BIP-39 passphrase changes the wallet cryptographically; the PIN does not.

If You Remember Only Five Things

  1. A seed is only as unpredictable as the process that created it; 24 words are just the encoding.
  2. The attack enumerates states of a flawed generator rather than guessing words.
  3. The public blockchain tells an attacker which candidate seed is real.
  4. An air gap cannot protect a secret that someone else can reconstruct independently.
  5. Fixing the RNG does not fix old RNG output: affected wallets need a newly generated seed and migration.

Cheat sheet

TermMeaning
TRNGTrue Random Number Generator: draws randomness from physical hardware behavior
CSPRNGA PRNG designed so its output cannot be predicted even given earlier output
YasmarangA small, fast, non-cryptographic PRNG in MicroPython; unsafe as the source of a wallet secret
BIP-39The Bitcoin standard mapping a block of initial entropy to a mnemonic word list (and back), with a checksum
BIP-39 passphraseAn extra secret combined with the seed words; every different passphrase produces a different wallet
Candidate-validation oracleAnything that lets an attacker confirm whether a guessed seed is correct; here, the public blockchain

Sources & Further Reading