virginnfts.

Decoding liquidity in the NFT economy.

News

CryptoJS Weak RNG Drains $5.7M From Five Crypto Wallets

7 million in assets across five cryptocurrency wallet applications, per The Hacker News.

CryptoJS Weak RNG Drains $5.7M From Five Crypto Wallets

A vulnerability in the CryptoJS library's weak random number generator has drained $5.7 million in assets across five cryptocurrency wallet applications, per The Hacker News. The flaw compromised the entropy used during wallet setup, enabling attackers to reconstruct private keys. For NFT marketplace participants who custody positions through these wallets, the incident quantifies the direct cost of insufficient cryptographic randomness in production software.

Where the Entropy Failed

The exploit chain is mechanical. CryptoJS is a widely deployed JavaScript cryptography library; its RNG produced insufficient entropy, the input randomness that makes a private key unguessable. With predictable output, key derivation becomes a finite search problem. Attackers who replicate the entropy sequence regenerate the keypair and sweep the wallet without ever touching the user's seed phrase.

Confirmed parameters:

  • Total drained: $5.7 million
  • Affected applications: five cryptocurrency wallet apps
  • Root cause: weak RNG in CryptoJS
  • Attack vector: private key reconstruction at wallet setup
  • Primary disclosure: The Hacker News, August 6, 2026

Affected wallet names, version ranges, and chain-by-chain loss breakdowns are not in public reporting.

Risk Surface and Operational Response

Browser-based and JavaScript-native wallets are the highest-exposure tier — any dependency on CryptoJS in the key generation path is suspect. Mobile app wallets carry exposure only if RNG calls route through CryptoJS rather than the platform secure random API. Hardware wallets with EAL6+ secure elements have zero exposure: keys are generated inside an isolated chip, never via software RNG.

The architectural logic is identical to local-first security stacks more often discussed in adjacent fields — for instance, the principle behind NXP's local generative AI gateway for private smart home orchestration, where sensitive processing stays on-device rather than crossing external trust boundaries. The same isolation principle applies to entropy: generate locally, inside verified hardware, and never assume default library behavior is cryptographically sufficient.

Steps for users holding NFT positions in affected or suspect wallets:

1. Audit the dependency chain — check the wallet provider's documentation or repository for CryptoJS usage in key generation.

2. Verify the RNG source — confirm the wallet calls crypto.getRandomValues, SecureRandom, or a hardware TRNG, not CryptoJS defaults.

3. Migrate high-value holdings — transfer NFT positions and token balances to wallets with documented isolated entropy generation.

4. Treat already-provisioned addresses as compromised — generate a new wallet and re-establish custody; do not attempt to "refresh" the existing key.

5. Record migration evidence — preserve transaction hashes and destination wallet attestation for potential claims processes.

Forward Indicators

The $5.7 million figure represents confirmed drains only. Comparable addresses generated under the same vulnerable conditions remain unidentified until on-chain clustering progresses.

Tracked signals:

  • Vendor disclosures naming affected versions, patch timelines, and migration windows
  • Post-mortem details on entropy source and mitigation path
  • Parallel audits of adjacent JS crypto libraries (jsrsasign, sjcl, noble-* suites) for the same RNG defect class
  • On-chain clustering linking drain transactions to a common operator

Risk assessment: until affected vendors publish formal advisories and migration procedures, any wallet with undocumented RNG sourcing should be treated as suspect. The economics favor rapid follow-on sweeps — low attacker cost, automatable derivation, and high per-wallet yield are the conditions that historically produce secondary drain waves within weeks of initial disclosure.