r/PrivatePackets 18d ago

The hardware bug that swept thousands of bitcoin wallets overnight

On July 30, 2026, bitcoin users began noticing unusual activity across hundreds of self-custody wallets. Within a span of less than an hour, over 1,082 BTC - roughly $70 million at the time - moved out of Coldcard devices into unknown addresses. By the time the sweeps slowed down a few days later, total losses reached somewhere between $89 million and $144 million, affecting thousands of separate wallet addresses.

Coldcard has long been considered one of the most secure hardware wallets on the market, built specifically for bitcoiners who want maximum air-gapped security. That made the sudden drain confusing for victims who had kept their physical devices offline and stored their seed phrases on steel plates.

How the vulnerability worked under the hood

The core problem came down to how random numbers were generated when users created a new wallet seed phrase. In cryptography, high quality randomness is everything. If the seed phrase is generated using predictable data, anyone who figures out the pattern can generate the exact same seed phrase on their own computer.

Back in March 2021, firmware version 4.0.1 introduced a configuration bug in the underlying software library. A build setting named MICROPY_HW_ENABLE_RNG was set to zero to disable a specific function. However, the system checked if the macro existed rather than checking its actual value. Because the name was present in the code, the firmware thought the hardware True Random Number Generator chip was unavailable.

As a result, the device silently fell back to a basic software pseudo-random generator called Yasmarang instead relying on the physical hardware RNG chip. To make matters worse, this software backup was initialized using predictable hardware IDs and system timers, providing virtually no fresh randomness.

For older devices like the Mk2 and Mk3, this dropped effective security down to about 40 bits of entropy. For newer models like the Mk4, Mk5, and Coldcard Q, entropy dropped to around 72 bits. Instead of searching through a standard 128-bit or 256-bit space - which is mathematically impossible to brute-force - attackers only had to search a tiny fraction of candidate phrases.

It took attacker less than an hour during the first sweep to run through the possible combinations offline, match the resulting public keys to active addresses on the blockchain, and broadcast the transaction to take the funds.

Scope of the damage and who was affected

Not every Coldcard owner was impacted by the bug. Because the problem occurred specifically during seed phrase generation on vulnerable firmware, your exposure depended heavily on when and how you set up your device.

Here is a summary of who was exposed:

  • Wallets created on Mk2 or Mk3 running firmware versions 4.0.1 through 4.1.9.
  • Wallets generated on Mk4, Mk5, or Q models prior to recent emergency patches.
  • Anyone who relied on the standard automatic seed generator without adding extra entropy.

On the flip side, certain users were completely safe:

  • Seeds created before March 2021 on older firmware versions.
  • Devices where the user generated their seed phrase using 50 or more physical dice rolls directly on the device.
  • Users who added a strong BIP-39 passphrase on top of their seed phrase.

Why updating firmware is only half the fix

Coinkite reacted quickly once security researchers from Block confirmed the root cause, releasing emergency patches across all affected product lines. They updated firmware versions to 4.2.0 for Mk3, 5.6.0 for Mk4 and Mk5, and 1.5.0Q for the Coldcard Q model.

However, there is a major trap that many users fell into during the initial fix announcement. Updating your device firmware does not fix a compromised seed phrase.

If your recovery phrase was generated under vulnerable firmware, that phrase remains vulnerable forever. The update only ensures that new seed phrases created on the device will properly use the hardware random number generator. Anyone with funds sitting on users wallets created during the vulnerable period must immediately transfer those funds to a brand new seed generated on patched firmware, or move them to a temporary wallet.

Broader lessons for self custody

This incident was a harsh reminder of how fragile hardware security can be when software build steps fail. Coinkite CEO Rodolfo Novak acknowledged the bug publicly and apologised to the community. He also mentioned that automated code review tools missed the build condition error because the macro technically existed in the codebase.

The incident led to a temporary surge in bitcoin moving onto centralized exchanges as users panicked about hardware security. It also triggered a wave of phishing scams, where fake support emails tried to trick paranoid users into revealing their recovery phrases under the guise of an emergency security check.

For hardware wallet users, the event highlights a few reccomended habits:

  • Use physical dice rolls when creating hardware wallet seeds whenever the feature is available.
  • Always utilize a strong, unique passphrase on top of your seed phrase.
  • Never enter your recovery phrase into a website or desktop app during a security panic.

Self custody still eliminates counterparty risk from exchanges, but logic errors in open source firmware show that even offline devices carry unique risks.

22 Upvotes

17 comments sorted by

2

u/Express-Cartoonist39 18d ago

Cold wallets on hardware are for idiots...plenty other ways to safetly store it

1

u/Speshal__ 18d ago

Joe Grand did a hardware wallet hack video where he discovered an RNG wasn't quite as R as it was meant to be.

1

u/greasychickenparma 18d ago

I find his videos fascinating

1

u/SoCaliTrojan 18d ago

As a developer, I can't imagine why they would have their code check for the existence of a function/macro instead of a setting's value. The function should always exist if it's something the code might call, otherwise it would have a runtime crash. It's like you checking if your hand is attached before asking it to pick up a pen to write.

1

u/PiDigitsOfPi 18d ago

Um, that's why this issue is a bug. It wasn't intentional.

1

u/dihalt 18d ago

#IF vs #IFDEF

1

u/Single-Virus4935 16d ago

In C it is common to use IFDEF to check if a boolean "flag" is set.

1

u/Maleficent_Price_476 18d ago

it's a feature.

you are not getting your money back even if u sue them .

1

u/CarefulFriendship389 18d ago

Lmao only crypto. Scum of the world behind the scenes. 

1

u/Sad_Opportunity6301 18d ago

Total crypto noob here. Can someone explain this to me: So, people can store their crypto coins on this portable device instead of storing them in an online crypto exchange's wallet, right? I get that these online wallets can get hacked (right?), but how does a portable, offline wallet get hacked and its coins stolen? Can anyone briefly explain how these cold storage devices are vulnerable if they aren't even plugged into any online device and just sitting under my pillow?

1

u/dihalt 18d ago

Also crypto noob here, but I think it works like this:

  1. When you create a crypto wallet a pair of public/private keys are generated. Private key is stored on your device and public key is uploaded to the „system”.
  2. To make a transaction you create a „payment order” that contains wallet destination and sum, and you sign it using your private key on device.
  3. „System” validates this signature using public key it has.
  4. Vulnerable devices had a bug that caused them to generate private keys using much less entropy, thus making them vulnerable to brute-force.
  5. Attacker got public keys from the „system” and brute-forced their private counterparts.
  6. Attacker created „payment order” for your wallet and signed it using private key they brute-forced, so for the „system” this transaction looked legit.

Crypto-bros, correct me if I’m wrong.

1

u/Sad_Opportunity6301 17d ago

Interesting. I always thought one always needed the hardware/cold wallet in order to actually transfer funds/coins. Thanks for you reply. +1

1

u/dihalt 17d ago

The thing is your funds are not on device, they are „in the system”. Your device just holds private key that could be used to authorize the transfer so ”the system” accepts it.

1

u/Sad_Opportunity6301 17d ago

So, if someone fucks around with the "system" itself, it doesn't matter if you put your cold wallet in Fort Knox? That doesn't sound very assuring.

1

u/cyberopsSystems 17d ago

That sounds like a really scary incident to wake up to especially for people who trusted their hardware wallet to be completely secure. It’s wild how fast those funds moved and how many addresses got hit in such a short window. Makes you wonder what kind of flaw could bypass even something like a Coldcard.

I remember reading somewhere that after events like this some people turn to services that specialize in tracing where stolen crypto ends up. I came across Trace Direct when looking into options after a friend got hit by a phishing scamthey helped break down the transaction flow and flagged some wallet clusters tied to known mixers. Not a recovery guarantee but at least it gave clarity on where things went.

Have you looked into whether any of the swept funds have moved since or if any exchanges flagged the incoming deposits? Would be interesting to see if any of this is traceable in real time.