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-1028132026-10-27CVE-2026-197423.72026-10-26CVE-2026-1122402026-10-20CVE-2026-1120413.72026-10-19CVE-2026-1076127.82026-10-08CVE-2026-1072833.72026-10-07CVE-2026-1043565.92026-10-01CVE-2026-539539.12026-10-01CVE-2026-98644.82026-10-01CVE-2026-799019.92026-10-01CVE-2026-944569.12026-09-22CVE-2026-941078.12026-09-20CVE-2026-938688.12026-09-18CVE-2026-927498.12026-09-16CVE-2026-922984.82026-09-16CVE-2026-748873.72026-08-17CVE-2026-748747.52026-08-17CVE-2026-735679.12026-08-13CVE-2026-186117.52026-08-10CVE-2026-718519.02026-08-07