Go to app

Technical Mechanism: The "Yasmarang" Fallback

Published 8/3/2026, 5:26:17 PM

In late July and early August 2026, a critical firmware vulnerability in Coldcard hardware wallets resulted in the theft of approximately 1,367.05 BTC (~$88.6 million) from 4,585 Bitcoin addresses [Source: https://thehackernews.com/2026/08/coldcard-hardware-wallet-flaw-linked-to.html]. The flaw, which originated in a 2021 code update, compromised the randomness of seed generation, allowing attackers to brute-force private keys offline.

Technical Mechanism: The "Yasmarang" Fallback

The vulnerability was caused by a firmware integration error in the libngu cryptographic library used by Coinkite. The library was intended to use the STM32 chip's hardware random number generator (TRNG), but a configuration error caused it to bypass the hardware entropy entirely [Source: https://engineering.block.xyz/blog/predictable-rng-fallback-and-32-bit-reseed-in-coldcard-firmware].

  • The Root Cause: The library checked for the existence of a macro (MICROPY_HW_ENABLE_RNG) rather than its value. Because Coinkite defined it as 0 (to use a custom wrapper), the library incorrectly defaulted to a deterministic software fallback called Yasmarang [Source: https://engineering.block.xyz/blog/predictable-rng-fallback-and-32-bit-reseed-in-coldcard-firmware].
  • Entropy Collapse: Instead of 128 bits of true randomness, seeds were generated using only three non-secret inputs: the chip's Unique ID (UID), a system timer, and the Real-Time Clock (RTC). This reduced security to as low as ~40 bits for Mk2/Mk3 models and ~72 bits for Mk4/Mk5/Q models [Source: https://blog.coinkite.com/entropy-technical-backgrounder/].
  • Brute-Forceability: At 40 bits of entropy, an attacker could reproduce the entire possible seed space using modern computing resources in a matter of days.

Timeline and Scope of the Incident

The vulnerability remained dormant for over five years before being exploited in a highly coordinated series of automated "sweeps."

DateEventImpact
March 17, 2021Vulnerable firmware (v4.0.1) released for Mk3.Vulnerability introduced.
July 30, 2026Wave 1 Attack: 1,196 addresses drained in 41 minutes.1,082.65 BTC stolen.
July 31, 2026Coinkite releases emergency firmware patches.Disclosure of the flaw.
Aug 1–2, 2026Waves 2 & 3: Attackers target smaller wallets.~284 BTC stolen.
August 2, 2026Final tally of the exploit confirmed.$88.6M (1,367.05 BTC)

[Sources: https://thehackernews.com/2026/08/coldcard-hardware-wallet-flaw-linked-to.html, https://x.com/glxyresearch/status/2083181683067506899]

Attack Characteristics

The exploit was characterized by extreme technical efficiency. Transactions used a hardcoded fee of 30 sat/vB and contained no change outputs, indicating a "sweep-all" automated script [Source: https://x.com/glxyresearch/status/2083181683067506899]. The first wave targeted high-value wallets (averaging ~0.9 BTC), while subsequent waves cleared out balances as low as 0.05 BTC.

Remediation and Exceptions

Coinkite issued emergency patches (v4.2.0+ for Mk3; v5.6.0+ for Mk4/Mk5; v1.5.0Q+ for Q) to fix the RNG routing [Source: https://blog.coinkite.com/coldcard-mk3-seed-generation-warning/].

Critical Note: Updating the firmware does not secure an existing wallet. Because the weakness occurred at the moment of seed generation, the only way to protect funds is to:

  1. Update to the patched firmware.
  2. Generate a completely new seed.
  3. Manually transfer all funds from the old (vulnerable) seed to the new one.

Exception for Dice Rolls: Users who generated their seeds using 50+ physical dice rolls were not affected. Manual dice entropy bypasses the internal PRNG entirely, ensuring the resulting private key was never subject to the firmware flaw [Source: https://blog.coinkite.com/entropy-technical-backgrounder/].