Skip to main content
Mallory
MediumPublic exploitVulnerability

CVE-2023-31290: Weak wallet-generation entropy in Trust Wallet browser extension

Published Apr 27, 2023 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS5.9Medium · v3.1
EPSS0.92%59th percentile
CISA KEVNoNot listed
In the wildReported3 exploitation records in Mallory
Vendor
Trust Wallet
IdentifiersCVE-2023-31290CWE-338 · Use of Cryptographically Weak…

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Attackers can recover vulnerable wallet mnemonics and the deterministic hierarchy of private keys derived from them, enabling unauthorized cryptocurrency transfers and theft of funds. Previously empty vulnerable wallets remain exposed if they later receive funds. Two known exploitation incidents caused approximately $170,000 in combined losses.

Mitigation

If you can’t patch tonight, do this now.

Treat mnemonics generated by affected extension versions as compromised and promptly transfer assets to wallets with newly and securely generated mnemonics. Do not rely on an extension update or reimporting the existing mnemonic to protect affected funds.

Remediation

Patch, then assume compromise.

Upgrade Trust Wallet Core to version 3.1.1 or later and the Trust Wallet browser extension to version 0.0.183 or later. Generate a new wallet with a fresh mnemonic using securely generated entropy and transfer assets from every affected wallet to the new wallet. Updating the software prevents future vulnerable generation but does not secure existing weak mnemonics; importing the same mnemonic into another wallet interface does not remediate the exposure.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
CVE-2023-31290-Scanner-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.ethicbrudhack · Disclosed Jun 22, 2026 · markdown · c++ · local · fileOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Trust WalletTrust Wallet Browser Extensionapplication
Trust WalletTrust Wallet Coreapplication
FAQ

Frequently asked questions

Is CVE-2023-31290 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2023-31290?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2023-31290, the earliest disclosed Jun 22, 2026.
Is there a patch for CVE-2023-31290?
Upgrade Trust Wallet Core to version 3.1.1 or later and the Trust Wallet browser extension to version 0.0.183 or later. Generate a new wallet with a fresh mnemonic using securely generated entropy and transfer assets from every affected wallet to the new wallet.
What products are affected by CVE-2023-31290?
Trust Wallet Browser Extension and Trust Wallet Core.
How severe is CVE-2023-31290?
CVE-2023-31290 has a CVSS v3.1 score of 5.9 (Medium) and an EPSS score of 0.92% (59th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

10 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
polynonceNews · Sep 11, 2026Milk Sad Disclosure (CVE-2023-39910) - Libbitcoin Explorer weak seed generation - "POLYNONCE"Уязвимость слабой генерации мнемоник в Trust Wallet, приведенная исключительно как сравнительный исторический пример аналогичной ошибки энтропии.Read more ↗polynonceNews · Sep 11, 2026Trust Wallet Browser Extension: постмортем уязвимости WASM PRNG (CVE-2023-31290) - "POLYNONCE"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.Read more ↗polynonceNews · Sep 11, 2026Milk Sad: CVE-2023-39910 - раскрытие уязвимости и технический анализ - "POLYNONCE"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.Read more ↗the hacker newsNews · Jul 10, 2026Attackers Exploit 'Ill Bloom' Vulnerability to Drain $3.1 Million From Cryptocurrency WalletsA weak-randomness vulnerability affecting the Trust Wallet browser extension that made wallet recovery phrases crackable in under a day.Read more ↗
+6 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware2Malware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.