Description
A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time.
The use of predictable seeds significantly reduces the number of possible seeds that an attacker would need to test in order to predict which random numbers will be generated by the PRNG.
Modes of Introduction:
– Architecture and Design
Related Weaknesses
Consequences
Other: Varies by Context
Potential Mitigations
Phase:
Description:
Use non-predictable inputs for seed generation.
Phase: Architecture and Design, Requirements
Description:
Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems, or use the more recent FIPS 140-3 [REF-1192] if possible.
Phase: Implementation
Description:
Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.
CVE References
- CVE-2019-11495
- server uses erlang:now() to seed the PRNG, which
results in a small search space for potential random
seeds
- server uses erlang:now() to seed the PRNG, which
- CVE-2008-0166
- The removal of a couple lines of code caused Debian’s OpenSSL Package to only use the current process ID for seeding a PRNG
- CVE-2016-10180
- Router’s PIN generation is based on rand(time(0)) seeding.
- CVE-2018-9057
- cloud provider product uses a non-cryptographically secure PRNG and seeds it with the current time
More Stories
The Most Dangerous Vulnerabilities in Apache Tomcat and How to Protect Against Them
Apache Tomcat is an open-source web server and servlet container that is widely used in enterprise environments to run Java...
ZDI-CAN-18333: A Critical Zero-Day Vulnerability in Microsoft Windows
Zero-day vulnerabilities are a serious threat to cybersecurity, as they can be exploited by malicious actors to gain unauthorized access...
CWE-669 – Incorrect Resource Transfer Between Spheres
Description The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere,...
CWE-67 – Improper Handling of Windows Device Names
Description The software constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a...
CWE-670 – Always-Incorrect Control Flow Implementation
Description The code contains a control flow path that does not reflect the algorithm that the path is intended to...
CWE-671 – Lack of Administrator Control over Security
Description The product uses security features in a way that prevents the product's administrator from tailoring security settings to reflect...