A newly disclosed cybersecurity issue has revealed that a weak random number generator (RNG) in the CryptoJS JavaScript library was responsible for a series of cryptocurrency wallet thefts worth at least $5.7 million. Blockchain security company Coinspect found that the vulnerability allowed attackers to predict wallet recovery phrases generated by some applications. The company named this campaign Ill Bloom and confirmed that the attacks were linked to the flawed random number generation used during wallet creation.

crypto-wallet-security-device-cryptojs-vulnerability

According to the researchers, the vulnerable function, CryptoJS.lib.WordArray.random(), was introduced around 12 years ago and did not generate enough randomness for security-sensitive operations. Recovery phrases created using this function became much easier to guess than they should have been. Instead of having an extremely large number of possible combinations, the flaw reduced the search space enough for attackers to calculate possible phrases using ordinary computer hardware.

Coinspect confirmed that five cryptocurrency wallet applications were affected by this issue. These include RRWallet, Bexo Wallet, NanChat, Bitcoin Libre, and Milo. Some of these applications have already released security fixes, while others have been discontinued without receiving updates. However, researchers warned that simply updating the wallet application does not secure recovery phrases that were originally created using the vulnerable versions.

blockchain-network-crypto-wallet-security

The researchers explained that if a recovery phrase was generated using the weak random number generator, it remains vulnerable even if it is later imported into another wallet, including a hardware wallet. This is because the weakness exists in the original phrase itself. Users who created wallets using affected versions are advised to generate a completely new recovery phrase in a secure environment and transfer all their cryptocurrency funds to the new wallet.

Coinspect successfully recreated the attack by generating the possible random outputs, converting them into standard BIP39 recovery phrases, deriving wallet addresses, and comparing them with publicly available blockchain data. This process confirmed that attackers could systematically identify vulnerable wallets and steal their funds. The research also showed that the attacks targeted wallets across several blockchain networks, including Bitcoin, Ethereum, Tron, Polygon, and Rootstock.

cryptojs-javascript-random-number-generator-flaw

The investigation found that the attackers carried out two major theft campaigns. The first began on May 27, stealing approximately $3.14 million from 431 accounts. A second wave took place between May 30 and July 13, stealing another $2.55 million from addresses connected to 522 recovery phrases, including about 2.18 million USDT taken from a single Tron wallet. Overall, the confirmed losses reached $5,690,922, although researchers believe the actual total could be even higher.

The report also highlighted the history of the CryptoJS library. A stronger source of randomness was briefly introduced in versions 3.2.0 and 3.2.1, but the improvement was later removed in version 3.3.0 because developers considered it a breaking change. A permanent fix using native cryptographic randomness was finally introduced in CryptoJS version 4.0.0, released in February 2020. The advisory notes that applications are only vulnerable if they used the affected function to generate sensitive values such as wallet recovery phrases.

cryptojs-security-update-wallet-software-patch

Researchers emphasized that users should not assume their wallets are safe simply because they updated the application. Anyone who generated a recovery phrase using an affected version should create a new secure wallet and move their assets immediately. Coinspect also delayed publishing full technical details for nearly two months to give wallet developers time to release fixes and reduce the risk of additional attacks. The company continues to advise users to follow official wallet guidance and verify whether their recovery phrases were created using vulnerable software.

Stay alert, and keep your security measures updated!

Source: Follow cybersecurity88 on X and LinkedIn for the latest cybersecurity news