CWE-330: Use of Insufficiently Random Values
340 CVEs have CWE-330 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 32.446%.
The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.
Child of CWE-693: Protection Mechanism Failure
Mitigations
- Architecture and Design: Use a well-vetted algorithm that is currently considered to be strong by experts in the field, and select well-tested implementations with adequate length seeds. In general, if a pseudo-random number generator is not advertised as being cryptographically secure, then it is probably a statistical PRNG and should not be used in security-sensitive contexts. Pseudo-random number generators can produce predictable numbers if the generator is known and the seed can be guessed. A 256-bit seed is a good starting point for producing a random enough number.
- Implementation: Consider a PRNG that re-seeds itself as needed from high quality pseudo-random output sources, such as hardware devices.
- Architecture and Design Requirements: Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C (Approved Random Number Generators).
Observed examples
- CVE-2021-3692: PHP framework uses mt_rand() function (Marsenne Twister) when generating tokens
- CVE-2020-7010: Cloud application on Kubernetes generates passwords using a weak random number generator based on deployment time.
- CVE-2009-3278: Crypto product uses rand() library function to generate a recovery key, making it easier to conduct brute force attacks.
- CVE-2009-3238: Random number generator can repeatedly generate the same value.
- CVE-2009-2367: Web application generates predictable session IDs, allowing session hijacking.
- CVE-2009-2158: Password recovery utility generates a relatively small number of random passwords, simplifying brute force attacks.
- CVE-2009-0255: Cryptographic key created with a seed based on the system time.
- CVE-2008-5162: Kernel function does not have a good entropy source just after boot.
- CVE-2008-4905: Blogging software uses a hard-coded salt when calculating a password hash.
- CVE-2008-4929: Bulletin board application uses insufficiently random names for uploaded files, allowing other users to access private files.
- CVE-2008-3612: Handheld device uses predictable TCP sequence numbers, allowing spoofing or hijacking of TCP connections.
- CVE-2008-2433: Web management console generates session IDs based on the login time, making it easier to conduct session hijacking.
- CVE-2008-0166: SSL library uses a weak random number generator that only generates 65,536 unique keys.
- CVE-2008-2108: Chain: insufficient precision (CWE-1339) in random-number generator causes some zero bits to be reliably generated, reducing the amount of entropy (CWE-331).
- CVE-2008-2020: CAPTCHA implementation does not produce enough different images, allowing bypass using a database of all possible checksums.
- CVE-2008-0087: DNS client uses predictable DNS transaction IDs, allowing DNS spoofing.
- CVE-2008-0141: Application generates passwords that are based on the time of day.
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2026-130802 | 2026-11-17 | CRITICAL | 9.1 | not scored | The NFC authentication handshake relies on a fixed, static challenge instead of a unique, random value for every session. This allows an attacker to perform a… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-330'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-330'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).