Coldcard Bitcoin Hack
When seed phrase generation goes wrong
TLDR:
A firmware bug on Coldcard hardware wallets let attackers brute-force seed phrases, with at least $100m of BTC stolen so far.
The bug was due to a misconfigured build flag that quietly swapped a 128-bit random number generator for a much weaker 40-bit one.
Coinkite believes the flaw was found using AI assistance, and a separate researcher confirmed this with his AI finding the flaw in just 8 minutes.
Hardware wallets are still safe, but if you want to avoid this type of risk then you can generate your own seed phrase with 256 coin flips as detailed below.
We’ve seen a growing trend of AI assisted hacks, but the same AI models being used by the bad guys can be used by the good guys, and this will harden the space.
Last week provided us with yet another crypto hack, but this one was somewhat scarier than most hacks we’ve seen recently because it was able to access funds directly from people’s hardware wallets! In principle hardware wallets are supposed to provide the safest self-custody option so when one of them gets hacked it rings massive alarm bells in the space.
However, when looking deeper into the story you can see that there was actually a major flaw in some of Coldcard’s firmware code, and not a flaw with how hardware wallets generally work. Below we’ll dive into what happened, why it’s scary (yet not as scary as you may think), and how you can protect yourself from problems like this.
If this post resonates with you and you enjoy the content then please share it with a friend and get rewarded for doing so!
This blog goes out weekly to over 20,000 subscribers. Please message me if you’re interested in sponsorships or partnerships.
Coldcard
Coldcard is one of the most respected hardware wallets in the Bitcoin space. It’s built by a company called Coinkite specifically to be air-gapped, meaning that your private keys are never meant to touch an internet-connected device at all.
Their reputation for being one of the best hardware wallets in the space is exactly why last week’s news of a hack stealing millions of dollars worth of Bitcoin from their users generated massive FUD!
Galaxy Research has traced at least $100m in Bitcoin stolen from thousands of addresses across at least three separate waves starting 30th July. All of this stolen BTC is currently sitting unspent in the attacker’s wallets, with that figure still climbing at the time of writing.
At first look this story sounds terrifying, after all self-custody of crypto through hardware wallets is meant to be one of the safest ways to store crypto!
However, in truth the vast majority of Coldcard users, and crypto wallets in general, have been completely unaffected by this.
What happened was that a firmware bug going back to March 2021 meant that some Coldcard devices were generating seed phrases with far weaker randomness than anyone realised. Attackers used that weakness to brute-force the private keys directly, without needing any phishing, malware, or tricking anyone into signing anything.
A seed phrase generated with at least 128 bits of entropy is not brute-forceable by any computer that exists today or is likely to exist in our life time. But on the affected devices, that entropy was quietly cut down without anyone noticing.
So this was very much a code bug on seed phrase generation, as opposed to a flaw in the logic behind seed phrases or how hardware wallets work.
The entropy problem
Entropy is just a measure of randomness, specifically how many different possible outcomes there are. A seed phrase with 128 bits of entropy has 2^128 possible combinations sitting behind it.
That number is hard to even conceptualise. Even if every computer on Earth guessed non-stop, the sun would burn out before they got meaningfully close to finding a specific seed phrase. That’s the core security guarantee underneath every properly generated seed phrase, it’s maths at a scale that nothing can brute-force.
I’ve actually made this point a few times in my blog before. My post on converting seed phrases to private keys back in 2024 stated plainly that anything above 12 words produces a seed phrase that isn’t crackable by brute force.
While my “Web3 Security 101” post that I’ve shared a few times in the past made the point that a properly generated seed phrase has more possible private keys than the number of atoms in the observable universe.
So what actually went wrong?
The root cause was a single misconfigured build flag in Coldcard’s firmware. A preprocessor guard checked only whether a setting was defined, not what value it held.
That tiny error silently caused seed generation to a use a fallback function in the software for its random number generator (RNG) instead of the device’s dedicated hardware RNG chip! In other words the wrong RNG was being used.
In practice entropy dropped from the intended 128 bits down to around 72 bits on newer Coldcard Mk4 and Mk5 devices, and as low as roughly 40 bits on the oldest Mk3 units!
Having 40 bits of entropy doesn’t sound very far from 128 until you remember that every extra bit doubles the difficulty. The actual gap between the two is roughly a trillion trillion trillion times smaller! With 40 bits you can comfortably check the entire space of possible seeds if you have enough computing power.
AI made this cheap to find
Coinkite believes the attacker found this flaw using an AI-assisted code review of its open-source firmware, which can be found here - github.com/Coldcard/firmware.
After the bug went public, a separate developer pointed their own configuration of Claude Code at the same codebase and rediscovered the exact same vulnerability in about 8 minutes.
Some security researchers pointed out that this specific class of bug, a preprocessor checking whether something is defined rather than what it’s set to, is already well documented in embedded systems literature. So a sharp human reviewer could plausibly have caught it too.
AI didn’t necessarily invent a new capability here. Yet the code had been open to the public to review since 2021 and nobody had found it before. AI was able to make that capability radically cheaper and faster to apply at scale.
Reviewing an entire open-source codebase for this class of bug used to take real expertise and real time. Now it takes minutes with a tool pretty much anyone can access, and that changes the economics of how easy it is to find these vulnerabilities.
Crypto's learning to live with this
This isn’t an isolated incident, it’s part of a pattern we’re seeing in the space. Back in May my “DeFi United” post covered a wave of roughly 40 DeFi hacks in a single month with over $600m stolen, and the coordinated community response that followed to recover $300m+ of it.
The truth is that crypto is an industry with over $2tn worth of onchain value, so there’s a huge incentive for the bad guys to keep finding vulnerabilities like this one, meaning we can certainly expect more of them to come.
However, the AI point cuts in both directions. The same tools making it cheap for attackers to find bugs are just as available to the teams defending against them. The direction of travel is that defensive auditing gets cheaper at roughly the same rate offensive auditing does.
Plus the track record on response is genuinely very good. Coinkite published a public advisory and patched firmware within days of the exploit being discovered. And DeFi United organised its response within weeks as we covered before. Crypto simply moves faster on security issues than most industries do.
A website has already been setup to track all the money and wallets that were taken from this Coldcard hack at coldcardwatch.com.
Nonetheless, none of this brings back the stolen money, and in many cases people lost their life’s savings in some truly heartbreaking stories to read.
How to avoid it
While this is a real and serious wake-up call, it is also not a reason to distrust hardware wallets or self-custody as a concept. What it does show is that even well-respected, heavily used products can ship a one-line build error that survives undetected for years.
If you want to remove any doubt at all though, you don’t actually have to trust a device’s RNG to begin with. Every major hardware wallet, Coldcard included, lets you import a seed you generated yourself rather than asking the device to create one internally.
There’s many ways to create a seed phrase that you can find online. However, if you want a simple, albeit very time-consuming, way to remove any involvement of software or hardware related RNGs then you can grab a coin and do the following:
Flip a coin 128 times for a 12-word seed, or 256 times for a 24-word one, writing down heads as 1 and tails as 0 as you go along.
Take that string of 1s and 0s to Ian Coleman’s BIP39 tool (the one covered in the “Convert Seed Phrases to Private Keys” post I mentioned earlier), and enter it as your own entropy rather than letting the tool generate one for you.
The tool will convert that entropy into the actual mnemonic words for the seed prhase. Write your new seed phrase down.
Import those exact words into your Coldcard, or any hardware wallet, as a restored seed phrase rather than a freshly generated one.
Do the whole thing offline and flip the coin honestly - a human trying to fake randomness is far more predictable than a real coin is.
Do this properly and no RNG bug can ever touch you, as the seed was never generated by any software of hardware device itself.
If you need any more help you can check out this video below, although note that you can do this with a single coin and certainly don’t need 256 individual coins as suggested in the video.
There’s no doubt that AI has made it cheaper than ever to discover vulnerabilities. However, Crypto’s shown many times before that it hardens fast after incidents like this.
Although the bad guys are leveraging these tools to the best of their abilities you can be sure that the good guys are also rallying to protect themselves and the space. Stay safe out there.
Whenever you’re ready, these are the main ways I can help you:
Want high crypto returns? Earn up to 14% APY with your own Yieldseeker agent!
Love Web3 & AI? Follow @afoxinweb3 on X for insights!
Entrepreneur using AI? Join our AI community to accelerate your results!













