{"answers":{"affected":"2 open source packages ship an affected version, including crypto-js.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-71851 exists.","fix":"Upgrade crypto-js to 4.0.0 or later.","what":"CVE-2026-71851 is a critical vulnerability in brix crypto-js, published on 7 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-71851 and fix it if it is affected.\n\nWhat it is: CVE-2026-71851 is a critical vulnerability in brix crypto-js, published on 7 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-71851 exists.\n\nAffected packages and fixed versions:\n- crypto-js (npm): affected all versions; fixed in 4.0.0\n- crypto-js (npm): affected all versions; fixed in 4.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-71851/ (Markdown: https://insights.sbomify.com/CVE-2026-71851/index.md)","id":"CVE-2026-71851","markdown":"https://insights.sbomify.com/CVE-2026-71851/index.md","name":"CVE-2026-71851","record":{"aliases":["DEBIAN-CVE-2026-71851","GHSA-rg76-677x-56q9","ROOT-APP-NPM-CVE-2026-71851","UBUNTU-CVE-2026-71851"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["privilege_escalation","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript crypto library","requires_auth":"none","summary":"Insufficient entropy in crypto-js allows attackers to enumerate private keys and steal funds from downstream wallet applications.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-338","name":"Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)"},{"id":"CWE-334","name":"Small Space of Random Values"},{"id":"CWE-331","name":"Insufficient Entropy"}],"description":"crypto-js is a JavaScript library of crypto standards. Versions of crypto-js prior to 4.0.0 generate randomness in CryptoJS.lib.WordArray.random() using a custom variation of the Multiply-With-Carry pseudorandom number generator, seeded from Math.random(), instead of a cryptographically secure source. This generator was introduced in version 3.1.2-4 and remained present in nearly every 3.x release. Nominal requests for 128 or 256 bits of entropy through this function produce effective search spaces of approximately 2 to the 39th and 2 to the 47th possibilities, small enough to enumerate on commodity hardware. Downstream wallet applications that used CryptoJS.lib.WordArray.random() as the entropy source for BIP39 recovery phrases are affected, and an attacker who enumerates the reduced output space can recover the resulting private keys and control the associated funds. This issue is fixed in version 4.0.0.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2026-08-31","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-08-31T11:57:29Z","kind":"github_poc","ref":"https://github.com/brendonlee20042004-sys/weakrng-sweep","stars":0,"title":"Weak-RNG stream-sweep research (CVE-2026-71851 class): PRNG schemes x seeds -\u003e BIP39 -\u003e victim set membership"}],"tier":"weaponised"},"has_fix":true,"headline":"crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain","id":"CVE-2026-71851","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"weak_cryptography","year":"2026"},"n_packages":2,"n_references":3,"next":{"headline":"pypdf: Possible long runtimes/large memory usage for large CID font width ranges","id":"CVE-2026-71852"},"packages":[{"ecosystem":"npm","fixed":["4.0.0"],"introduced":["0"],"last_affected":[],"package":"crypto-js","purl":null,"source":"GHSA-rg76-677x-56q9"},{"ecosystem":"npm","fixed":["4.0.0"],"introduced":["0"],"last_affected":[],"package":"crypto-js","purl":"pkg:npm/crypto-js","source":"GHSA-rg76-677x-56q9"}],"prev":{"headline":"Hono: `memo()` retains SSR output across requests, leading to cross-user data disclosure","id":"CVE-2026-71850"},"products":["crypto-js"],"published":"2026-08-07","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-08","vendors":["brix"]},"summary":"Insufficient entropy in crypto-js allows attackers to enumerate private keys and steal funds from downstream wallet applications.","url":"https://insights.sbomify.com/CVE-2026-71851/"}