CWE•Base•Draft•20 recent CVEs
CWE-338Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Description
The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
[object Object]
Common consequences
- Access Control→Bypass Protection MechanismIf a PRNG is used for authentication and authorization, such as a session ID or a seed for generating a cryptographic key, then an attacker may be able to easily guess the ID or cryptographic key and gain access to restricted functionality.
Potential mitigations
- ImplementationUse functions or hardware which use a hardware-based random number generation for all crypto. This is the recommended solution. Use CyptGenRandom on Windows, or hw_rand() on Linux.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-478828.32026-07-30CVE-2026-647989.12026-07-22CVE-2026-166156.82026-07-22CVE-2026-81692026-07-20CVE-2026-135778.22026-07-20CVE-2026-162359.82026-07-20CVE-2026-93238.12026-07-18CVE-2026-130825.32026-07-17CVE-2026-630899.32026-07-16CVE-2026-615009.82026-07-13CVE-2026-144958.82026-07-08CVE-2026-560165.92026-07-01CVE-2026-78307.42026-07-01CVE-2026-440404.82026-07-01CVE-2026-78749.12026-06-30CVE-2026-570825.92026-06-30CVE-2026-97332026-06-23CVE-2026-561419.82026-06-19CVE-2026-96925.32026-06-18CVE-2026-118329.12026-06-15