CWE Database
/

CWE-1241

Back to CWE list

CWE-1241

Use of Predictable Algorithm in Random Number Generator

Base
Draft

Description

The device uses an algorithm that is predictable and generates a pseudo-random number.

{"xhtml:p":["Pseudo-random number generator algorithms are predictable because their registers have a finite number of possible states, which eventually lead to repeating patterns. As a result, pseudo-random number generators (PRNGs) can compromise their randomness or expose their internal state to various attacks, such as reverse engineering or tampering. "]}

Common Consequences

Scope

Confidentiality

Impact

Read Application Data

Potential Mitigations

Architecture and Design

It is highly recommended to use a true random number generator (TRNG) to ensure the security of encryption schemes. Hardware-based TRNGs generate unpredictable, unbiased, and independent random numbers because they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.

Implementation

It is highly recommended to use a true random number generator (TRNG) to ensure the security of encryption schemes. Hardware-based TRNGs generate unpredictable, unbiased, and independent random numbers because they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.

CVE-2021-3692

PHP framework uses mt_rand() function (Marsenne Twister) when generating tokens

Security Training

Train your team to recognize and prevent security threats with our comprehensive security awareness program.

Start Training

Vulnerability Scanning

Discover vulnerabilities in your applications and infrastructure before attackers do.

Scan Now