CVE-2023-31290 is a cryptographically weak pseudorandom-number generation vulnerability in Trust Wallet Core before 3.1.1, affecting Trust Wallet browser extension versions 0.0.172 through 0.0.182. The WebAssembly wallet-generation path initializes the mt19937 Mersenne Twister with a single 32-bit seed, restricting possible BIP-39 mnemonics to at most 4,294,967,296 candidates. Attackers can enumerate these candidates, derive wallet keys and addresses, and identify vulnerable wallets using public blockchain data. New wallets generated during November 14–23, 2022, were affected; Trust Wallet mobile applications were unaffected. The vulnerability was exploited in December 2022 and March 2023.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a standalone C++ exploit/scanner toolkit targeting CVE-2023-31290 ('Milk Sad') in libbitcoin-explorer. It is not a framework module. The core purpose is to brute-force the vulnerable 32-bit PRNG seed space, regenerate BIP39 mnemonics, derive cryptocurrency addresses, and compare them against large local datasets to identify wallets whose seed phrases may be recoverable. Repository structure: (1) scanbtc.cpp is the main Bitcoin scanner; it uses multithreading, mmap-backed input, a 24-bit prefix index, OpenSSL, and secp256k1 to derive and test Bitcoin address hashes at scale. (2) scaneth.cpp is the analogous Ethereum scanner, using secp256k1 plus a bundled Keccak implementation from keccak_fixed.h to derive Ethereum addresses across multiple derivation paths. (3) adrestobin.cpp is a preprocessing utility that parses cryptocurrency addresses from text, validates/decodes them (including Base58/Bech32-style handling for several coins and Ethereum prefix recognition), and writes 20-byte binary records for fast lookup. (4) sortbin.cpp is a large-file external sorter/merger for those 20-byte records, producing sorted binary datasets suitable for the scanners' binary-search/prefix-index lookup model. (5) keccak_fixed.h provides a local Keccak-256 implementation used by the Ethereum scanner. Exploit capability: the code operationalizes wallet recovery against vulnerable wallets rather than merely detecting exposure. It supports 12-word and 24-word mnemonic generation, Bitcoin address derivation for P2PKH/P2SH/Bech32 paths, and Ethereum derivation across m/44'/60'/0'/0/0-9. The scanners process seed ranges in batches across 30 threads and report throughput. The README also notes cross-chain reuse implications (e.g., Litecoin, Dogecoin, Dash, Zcash, BCH, and EVM chains), though the included primary scanners focus on Bitcoin and Ethereum. No network callbacks, C2, or remote exploit delivery endpoints are present in the provided code. The attack vector is local/offline: the operator supplies local files and computes candidate wallet material against precompiled address/hash datasets. This makes the repository best characterized as an operational brute-force wallet recovery exploit for a known cryptographic weakness.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
10 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
Уязвимость слабой генерации мнемоник в Trust Wallet, приведенная исключительно как сравнительный исторический пример аналогичной ошибки энтропии.
A weak-entropy vulnerability in the Trust Wallet Core WebAssembly implementation used by the Trust Wallet browser extension. Mersenne Twister was initialized with only a 32-bit seed, limiting generated BIP-39 mnemonics to approximately 2^32 possibilities and enabling practical brute-force recovery of wallet private keys. The article identifies the affected wallet-creation window as November 14–23, 2022, beginning with extension version 0.0.172. Two known exploitation incidents reportedly caused approximately $170,000 in losses. Mobile applications were unaffected. Updating prevents vulnerable wallet generation but does not secure existing weak secrets; affected users must transfer assets to newly and securely generated wallets.
A Trust Wallet weak-entropy vulnerability referenced as a related case: it used MT19937 for wallet entropy, producing an enumerable state space. Its byte-extraction implementation differed from Milk Sad, so the resulting mnemonic sets and exploitation details were not identical.
A weak-randomness vulnerability affecting the Trust Wallet browser extension that made wallet recovery phrases crackable in under a day.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.