CWE-338Base

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Draft in the CWE catalog · 131 CVEs mapped

131
CVEs mapped
7.5
Median CVSS
What it is

The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.

Recent examples
3.7cvss
CVE-2026-74887

CVE-2026-74887 - LOW Severity Vulnerability

openssl_encrypt before 1.4.0 imports Python's non-cryptographic 'random' module (Mersenne Twister PRNG) at line 15 of openssl_encrypt/modules/pqc.py. No direct calls to random.* were present in the code, so no cryptographic operation is currently affected; however, the import creates a hazard that future code could inadvertently use random.randint() instead of a cryptographically secure alternative (secrets/os.urandom), producing predictable values since the Mersenne Twister state can be recovered from approximately 624 outputs. Fixed by removing the import in 1.4.0.

LOWno explanation yet
0%
epss
7.5cvss
CVE-2026-74874

CVE-2026-74874 - HIGH Severity Vulnerability

openssl_encrypt versions before 1.4.0 use Python's non-cryptographic random module for steganographic pixel selection in the generate_pseudorandom_sequence function. Attackers who know the password can recover the Mersenne Twister state from approximately 624 outputs and predict pixel locations containing hidden data for extraction.

HIGHno explanation yet
0%
epss
9.1cvss
CVE-2026-73567

CVE-2026-73567 - CRITICAL Severity Vulnerability

sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. Prior to 0.5.0, the default no-argument sm2.generateKeyPairHex() path in Node.js uses the module-wide SecureRandom instance in src/sm2/utils.js, supplied by [email protected], which seeds an ARC4 stream from Math.random() and new Date().getTime() because window.crypto.getRandomValues is unavailable even though globalThis.crypto exists. An attacker who can observe the process's Math.random() outputs and estimate the key-generation time can reconstruct the seed, recover generated SM2 private keys, and predict signing ephemeral scalars used to forge signatures. This issue is fixed in version 0.5.0.

CRITICALno explanation yet
0%
epss
The record
Technical detail
CWE ID
CWE-338
Abstraction
Base
Structure
Simple
Status
Draft
References (1)