13 vulnerabilities classified as CWE-335 (PRNG种子错误). AI Chinese analysis included.
CWE-335 represents a critical implementation flaw where developers fail to properly initialize or manage the seeds for a Pseudo-Random Number Generator. Because PRNGs are deterministic algorithms that merely simulate randomness, their security relies entirely on the unpredictability of their starting state. Attackers typically exploit this weakness by predicting the generator’s output sequence if the seed is derived from predictable sources, such as system time or process identifiers. This predictability allows adversaries to bypass security controls, forge session tokens, or crack encryption keys that depend on these flawed random values. To mitigate this risk, developers must ensure that PRNGs are seeded with high-entropy data from cryptographically secure sources, such as operating system-provided random number generators, rather than using easily guessable or static values that compromise the integrity of the entire cryptographic system.
private static final long SEED = 1234567890; public int generateAccountID() { Random random = new Random(SEED); return random.nextInt(); }Random random = new Random(System.currentTimeMillis()); int accountID = random.nextInt();srand(time()); int randNum = rand();Vulnerabilities classified as CWE-335 (PRNG种子错误) represent 13 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.