Vulnerability in crypto-js (CVE-2026-71851)
Summary
Vulnerability in crypto-js (CVE-2026-71851). Successful exploitation can lead to full system takeover. Exploitable via crypto. Mitigation: upgrade to 4.0.0 or later.
Original description
The description as published by the source.
Summary
CryptoJS.lib.WordArray.random() in affected versions is not a cryptographically secure random number generator. Nominal requests for 128 or 256 bits of entropy produce effective search spaces of approximately 2^39 and 2^47 possibilities — small enough to enumerate on commodity hardware.
Coinspect's Ill Bloom investigation confirmed that downstream wallet applications used this function as the entropy source for BIP39 recovery phrases.
An application is affected only if it uses the vulnerable function to generate security-sensitive values.
Merely depending on crypto-js < 4.0.0 is not sufficient to be exploitable.
Details
The affected implementation used a custom variation of George Marsaglia's Multiply-With-Carry PRNG, seeded from Math.random(). It was introduced in 3.1.2-4 (June 2014, commit brix/crypto-js@ff1f003) in response to issue #7, and was present in every 3.x release except 3.2.0 and 3.2.1. That change was reverted in 3.3.0 because it was considered a breaking change, so projects tracking the 3.x line could resolve to newer versions that still contained the weak generator.
4.0.0 replaced the generator with the platform's native cryptographic API.
Applying PBKDF2, another KDF, or a cryptographic hash after the vulnerable generator does not restore missing entropy.
Proof of concept
Coinspect reproduced the attack end to end:
- Reimplemented the affected `WordArra…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-71851 has been found in crypto-js.
Attackers can target a specific entry point like crypto over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 9.0/10.
What to do: upgrade crypto-js to 4.0.0 or later.
If unsure, ask your IT team or search "crypto-js CVE-2026-71851" on the vendor's site.
CVE-2026-71851 (crypto-js) — CWE-331 / CVSS v3 9.0
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: crypto
Patched: 4.0.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-331) exists in crypto-js. Attackers reach the vulnerable code path via crypto without authentication.
Check the vendor advisory for the affected versions of crypto-js. Attack surface: crypto.
Severity: Critical (CVSS 9.0/10). Successful exploitation can lead to full system takeover.
Update to 4.0.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'crypto-js' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'crypto-js' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
crypto-jsを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade crypto-js to 4.0.0ステージング環境で 4.0.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com
- web coinspect.com
- web github.com