NewsCryptoFive-Year-Old Build Flag Linked to $116 Million COLDCARD Hardware Wallet Exploit

Five-Year-Old Build Flag Linked to $116 Million COLDCARD Hardware Wallet Exploit

Author: CoinLineup·

Key Takeaways

  • A misconfigured build flag in COLDCARD firmware disabled the hardware random number generator for approximately five years, causing seed generation to fall back to a predictable pseudo-random number generator.
  • Attackers stole approximately 1,816 BTC valued at $116 million from more than 5,200 addresses across four separate exploitation waves.
  • Affected Mk4, Q, and Mk5 devices generated seeds with approximately 72 bits of entropy instead of the intended 128 bits, making brute-force reconstruction of private keys feasible for well-resourced attackers.
  • Coinkite warned that funds remain at risk unless seeds were created with at least 50 independent dice rolls or secured with a strong BIP-39 passphrase, with remediation complicated by five separate firmware release tracks.
  • Analysts suggested the incident could accelerate interest in regulated custodians and spot bitcoin ETFs as the Fear & Greed Index dropped to 25, indicating Extreme Fear.
Five-Year-Old Build Flag Linked to $116 Million COLDCARD Hardware Wallet Exploit

A build flag left dormant in COLDCARD hardware wallet firmware for five years has been tied to the theft of approximately $116 million in bitcoin, after a misconfigured compile-time setting silently weakened the randomness used to generate user seeds. What began as an overlooked configuration choice resulted in one of the largest self-custody thefts recorded in 2026.

According to Block Engineering, the affected COLDCARD firmware defined the macro MICROPY_HW_ENABLE_RNG as zero, while the libngu library verified only whether the macro existed — not its actual value. This caused the system to fall back to MicroPython's deterministic Yasmarang pseudo-random number generator, which produces predictable output and fundamentally undermines the entropy that a hardware wallet is designed to guarantee.

How the Build Flag Became Central to the Exploit

A build flag is a compile-time switch that determines which features are enabled when software is assembled into a distributable binary. In this instance, the flag was intended to activate a true hardware random number generator. Instead, it was set to zero, and the downstream verification logic never caught the discrepancy.

Because the flag governed how private keys were seeded, the consequences were severe. Seeds serve as the master secret behind every address a wallet controls. Predictable randomness at the point of seed generation means that an attacker who understands the flaw can reconstruct the resulting private keys.

TRM Labs reported that attackers drained 1,816 BTC — valued at approximately $116 million — from more than 5,200 addresses across four separate waves. The scale of the campaign indicates that the vulnerability affected a broad population of devices rather than an isolated group of users.

Block Engineering stated that active exploitation was already underway when it published its analysis on July 30, 2026, and directed users to the wallet's manufacturer, Coinkite, for the definitive report.

What Failed Between Development, Release Review, and Security Controls

The survival of a misconfigured flag across multiple release cycles points to gaps in the verification pipeline. Hardware wallet security depends on strict code signing, reproducible builds, and rigorous integrity checks — precisely the safeguards that should have identified a zero-valued RNG macro.

Coinkite directly quantified the entropy shortfall. Seeds generated on Mk4, Q, and Mk5 devices running firmware prior to the fix contained approximately 72 bits of entropy instead of the expected 128 bits — a reduction that makes brute-force reconstruction of private keys feasible. In cryptographic terms, 72 bits represents a keyspace roughly 2^56 times smaller than the intended 128-bit standard, crossing the threshold from computationally infeasible to practical for a well-resourced attacker.

Coinkite advised that funds generated on affected firmware remain at risk unless the seed was created with at least 50 independent, private dice rolls, or the wallet was secured with a strong, unique BIP-39 passphrase. Remediation is further complicated by fragmentation across five separate firmware release tracks, rather than a single universal patch.

The distinction between checking a macro's existence and checking its value represents the type of subtle logic flaw that automated integrity checks and code review processes are designed to catch. Most documented hardware wallet attacks have relied on physical tampering, side-channel techniques, or supply chain compromise; a compile-time configuration flaw silently weakening entropy across years of production represents a distinct failure mode that existing threat models may not have adequately anticipated. Hardware wallet users expect a higher standard of protection than conventional applications precisely because a compromised seed cannot be rotated as easily as a password.

Broader Implications for Hardware Wallet Users and the Sector

A nine-figure loss directly challenges the core value proposition of cold storage. The timing is significant: self-custody adoption accelerated after the November 2022 collapse of FTX eroded trust in centralized exchanges, making hardware wallet vulnerabilities of this magnitude particularly damaging to the ecosystem's credibility. CoinDesk reported on July 31, 2026 that the exploit had already resulted in the theft of nearly 600 BTC, worth approximately $38 million at that time. Analysts suggested the incident could serve as a catalyst for interest in regulated custodians and spot bitcoin ETFs.

Market sentiment reflected the disruption. The Fear & Greed Index registered at 25, indicating Extreme Fear, as bitcoin traded near $64,766.

For affected users, the immediate practical questions are: which firmware track applies to their device, whether their seed met the dice-roll or passphrase exemption criteria, and how quickly funds can be migrated to a secure environment. As of August 6, 2026, Coinkite had not released its own cumulative loss figure or an attacker-address list, leaving TRM Labs' tally as the primary reference point.

The incident underscores that legacy build configurations are not inert. A single compile-time value, left unexamined across years of release cycles, translated into systemic risk for a product marketed on the strength of its security — a reminder that operational rigor at build time is inseparable from the trust placed in self-custody solutions.