
The Coldcard RNG Vulnerability: A Code-Level Breakdown of Why Trust in Hardware Wallets is Borrowed, Never Owned
Alextoshi
It was a quiet Tuesday morning in late August when I first saw the advisory on my feed. The Coldcard, one of the most respected hardware wallets in the Bitcoin ecosystem, had published a security notice about a random number generator (RNG) flaw. My first instinct was not panic, but verification. I had spent years auditing smart contracts and modeling risk for digital asset funds, and I knew that the gap between a vulnerability disclosure and real-world exploit is often where the damage is done. The Coldcard's RNG defect was not a theoretical abstraction — it was a code-level failure that could allow an attacker to predict or reconstruct private keys generated by affected devices. As I dug into the technical details, one phrase from my own risk framework echoed in my mind: "Trust is borrowed; trust is never owned."
The context of this vulnerability is critical for anyone who holds Bitcoin in self-custody. The Coldcard is built around a philosophy of air-gapped security, where the private key never touches the internet. The hardware random number generator (RNG) is the foundation of that security. If the RNG produces deterministic or predictable entropy, the entire seed — and every key derived from it — is compromised. The flaw was initially discovered by a team at Block (formerly Square) during a routine security audit. They traced the root cause to a code logic error: the firmware would sometimes route entropy requests to a deterministic MicroPython fallback path because a feature flag, defined as zero, was incorrectly evaluated as existing. This is the kind of bug that is almost invisible unless you are looking at the assembly-level memory layout. Coinkite, the manufacturer, responded quickly by releasing firmware updates (5.6.1 for Mk4/Mk5, 1.5.1Q for the Q model) that force users to manually input physical entropy — 50 dice rolls or 128 coin flips — during seed generation. This is a brilliant defensive measure, but it does not fix the underlying RNG issue. It only adds an external source of randomness, effectively bypassing the hardware path.
The core of the analysis lies in understanding what this vulnerability means for the security model of hardware wallets. The flaw affects all Coldcard Mk2, Mk3, and Mk4 units produced before the firmware update, potentially millions of devices. The critical insight is that the fix is not retroactive: any seed generated on an affected device under the old firmware remains vulnerable. Coinkite's official migration guide requires users to generate a new seed on a fresh device or after updating the firmware, then transfer all funds. This is a massive operational burden. Based on my experience auditing the Gnosis Safe in 2017, I know that the most dangerous part of any security incident is not the attack itself, but the user error during the recovery. The guide demands that users verify the new seed by performing a test transaction with a small amount, then a larger one. It also warns about the "dice exception" — if the user's physical randomness is not truly random (e.g., they use the same dice or an unfair coin), the new seed could still be weak. The security assumption shifts from "trust the hardware RNG" to "trust your physical randomness." This is a stronger user responsibility assumption, and one that many users are not prepared for.
But here is the contrarian angle: this event may actually strengthen the security narrative for Bitcoin self-custody in the long run. The convenience of hardware RNG has always been a point of implicit trust. By forcing users to engage with physical entropy, Coldcard is aligning with the cypherpunk ethos of sovereign randomness. The ledger remembers what the algorithm forgets — and the algorithm forgot to check that feature flag. Now, the ledger is being rewritten by human hands. Coinkite's transparency in publishing the Block analysis, their admission that the audit scope might be wider than their own internal testing, and the inclusion of additional security features like PSBT verification, SIGHASH_SINGLE restrictions, and a persistent RNG fault-stop mechanism, all point to a maturing security culture. The failure was not the bug itself, but the assumption that the hardware RNG alone was sufficient. Safety is the only yield that compounds over time, and this event forces the entire ecosystem to re-evaluate the yield of trust in opaque hardware.
The takeaway is not to panic, but to act with precision. If you own a Coldcard Mk2, Mk3, or Mk4 and have not updated the firmware, do not generate a new seed on the device without the update. Instead, order a new device or update the firmware, then follow the migration guide step by step, using a test transaction first. The real risk is not the vulnerability — it is the rushed migration that leads to a lost seed phrase. In the macro view, this event is a signal that the age of blind trust in hardware wallets is ending. The next cycle will favor transparent, auditable, and user-verifiable components. The code is the law, but the bugs are the reality. Verify before you trust, and remember: trust is borrowed, never owned.