p PatchFirst

CVE-2026-71851

CVE-2026-71851 · crypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency Chain

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 9.0 · Critical · EPSS 0.5% · Fix available

Published
Updated

Stack: system · node

Affected products and versions

  • crypto-js

    Versions
    • < 4.0.0: Affected

    No fix published

  • cryptojs Debian:12

    Versions
    • 3.1.2+dfsg-3
    • 3.1.2+dfsg-4
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • crypto-js npm

    Affected ranges
    • SEMVER: < 4.0.0

    Update to 4.0.0

  • cryptojs Ubuntu:Pro:16.04:LTS

    Versions
    • 3.1.2+dfsg-1
    • 3.1.2+dfsg-2
    • 3.1.2+dfsg-2ubuntu0.16.04.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • cryptojs Ubuntu:Pro:18.04:LTS

    Versions
    • 3.1.2+dfsg-2
    • 3.1.2+dfsg-2ubuntu0.18.04.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • cryptojs Ubuntu:20.04:LTS

    Versions
    • 3.1.2+dfsg-2
    • 3.1.2+dfsg-2ubuntu0.20.04.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • cryptojs Ubuntu:Pro:22.04:LTS

    Versions
    • 3.1.2+dfsg-3
    • 3.1.2+dfsg-3ubuntu0.22.04.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • cryptojs Ubuntu:24.04:LTS

    Versions
    • 3.1.2+dfsg-3
    • 3.1.2+dfsg-4
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →