Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
CWE-338
The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
When a non-cryptographic PRNG is used in a cryptographic context, it can expose the cryptography to certain types of attacks. Often a pseudo-random number generator (PRNG) is not designed for cryptography. Sometimes a mediocre source of randomness is sufficient or preferable for algorithms that use random numbers. Weak generators generally take less processing power and/or do not use the precious, finite, entropy sources on a system. While such PRNGs might have very useful features, these same features could be used to break the cryptography.
We track 99 vulnerabilities of this type. 100% are rated high or critical, and the average CVSS score is 8.6.
How this weakness is prevented
- Implementation: Use 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.
Latest Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerabilities
- 9.1 Critical severity
Business::OnlinePayment::StoredTransaction: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Business::OnlinePayment::StoredTransaction versions through 0.01 for Perl uses an insecure secret key. Business::OnlinePayment::StoredTransaction generates a secret key by using a MD5 hash of a single call to the built-in rand function, which is unsuitable for
- 9.8 Critical severity
HTTP::Session: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
HTTP::Session versions before 0.54 for Perl defaults to using insecurely generated session ids. HTTP::Session defaults to using HTTP::Session::ID::SHA1 to generate session ids using a SHA-1 hash seeded with the built-in rand function, the high resolution epoch
- 9.8 Critical severity
Amon2: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Amon2 versions before 6.17 for Perl use an insecure random_string implementation for security functions. In versions 6.06 through 6.16, the random_string function will attempt to read bytes from the /dev/urandom device, but if that is unavailable then it gener
- 9.1 Critical severity
jsrsasign: Incomplete Comparison with Missing Factors
Versions of the package jsrsasign from 7.0.0 and before 11.1.1 are vulnerable to Incomplete Comparison with Missing Factors via the getRandomBigIntegerZeroToMax and getRandomBigIntegerMinToMax functions in src/crypto-1.1.js; an attacker can recover the private
- 9.1 Critical severity
Net::NSCA::Client: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Net::NSCA::Client versions through 0.009002 for Perl uses a poor random number generator. Version v0.003 switched to use Data::Rand::Obscure instead of Crypt::Random for generation of a random initialisation vectors. Data::Rand::Obscure uses Perl's built-in ra
- 9.1 Critical severity
Apache::Session::Generate::MD5: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id. Apache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch t
- 9.8 Critical severity
Plack::Middleware::Session::Simple: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Plack::Middleware::Session::Simple versions before 0.05 for Perl generates session ids insecurely. The default session id generator returns a SHA-1 hash seeded with the built-in rand function, the epoch time, and the PID. The PID will come from a small set of
- 8.2 High severity
Apache::SessionX: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Apache::SessionX versions through 2.01 for Perl create insecure session id. Apache::SessionX generates session ids insecurely. The default session id generator in Apache::SessionX::Generate::MD5 returns a MD5 hash seeded with the built-in rand() function, the
- 9.1 Critical severity
Smolder: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Smolder versions through 1.51 for Perl uses insecure rand() function for cryptographic functions. Smolder 1.51 and earlier for Perl uses the rand() function as the default source of entropy, which is not cryptographically secure, for cryptographic functions. S
- 9.8 Critical severity
Concierge::Sessions: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Concierge::Sessions versions from 0.8.1 before 0.8.5 for Perl generate insecure session ids. The generate_session_id function in Concierge::Sessions::Base defaults to using the uuidgen command to generate a UUID, with a fallback to using Perl's built-in rand f
- 9.8 Critical severity
Maypole: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Maypole versions from 2.10 through 2.13 for Perl generates session ids insecurely. The session id is seeded with the system time (which is available from HTTP response headers), a call to the built-in rand() function, and the PID.
- 7.3 High severity
WWW::OAuth: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
WWW::OAuth 1.000 and earlier for Perl uses the rand() function as the default source of entropy, which is not cryptographically secure, for cryptographic functions.
- 9.4 Critical severity
fiber: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Fiber is an Express inspired web framework written in Go. Before 2.52.11, on Go versions prior to 1.24, the underlying crypto/rand implementation can return an error if secure randomness cannot be obtained. Because no error is returned by the Fiber v2 UUID fun
- 7.7 High severity
coturn: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
coturn is a free open source implementation of TURN and STUN Server. Versions 4.6.2r5 through 4.7.0-r4 have a bad random number generator for nonces and port randomization after refactoring. Additionally, random numbers aren't generated with openssl's RAND_byt
- 9.8 Critical severity
FreshRSS: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
FreshRSS is a free, self-hostable RSS aggregator. Prior to version 1.28.0, FreshRSS uses cryptographically weak random number generators (mt_rand() and uniqid()) to generate remember-me authentication tokens and challenge-response nonces. This allows attackers
- 9.8 Critical severity
WBCE_CMS: Insufficient Entropy
WBCE CMS is a content management system. Versions 1.6.4 and below use function GenerateRandomPassword() to create passwords using PHP's rand(). rand() is not cryptographically secure, which allows password sequences to be predicted or brute-forced. This can le
- 9.8 Critical severity
utils: Unchecked Return Value
Fiber Utils is a collection of common functions created for Fiber. In versions 2.0.0-rc.3 and below, when the system's cryptographic random number generator (crypto/rand) fails, both functions silently fall back to returning predictable UUID values, including
- 9.8 Critical severity
Apache Druid: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Apache Druid’s Kerberos authenticator uses a weak fallback secret when the `druid.auth.authenticator.kerberos.cookieSignatureSecret` configuration is not explicitly set. In this case, the secret is generated using `ThreadLocalRandom`, which is not a crypto-gra
- 7.4 High severity
variTRON300: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
A vulnerability was identified in the password generation algorithm when accessing the debug-interface. An unauthenticated local attacker with knowledge of the password generation timeframe might be able to brute force the password in a timely manner and thus
- 9.1 Critical severity
Starch: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Starch versions 0.14 and earlier generate session ids insecurely. The default session id generator returns a SHA-1 hash seeded with a counter, the epoch time, the built-in rand function, the PID, and internal Perl reference addresses. The PID will come from a
- 7.5 High severity
Apache::AuthAny: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Apache::AuthAny::Cookie v0.201 or earlier for Perl generates session ids insecurely. Session ids are generated using an MD5 hash of the epoch time and a call to the built-in rand function. The epoch time may be guessed, if it is not leaked from the HTTP Date h
- 8.6 High severity
Catalyst::Authentication::Credential::HTTP: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Catalyst::Authentication::Credential::HTTP versions 1.018 and earlier for Perl generate nonces using the Perl Data::UUID library. * Data::UUID does not use a strong cryptographic source for generating UUIDs. * Data::UUID returns v3 UUIDs, which are generated f
- 9.3 Critical severity
Vision-ui: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Vision UI is a collection of enterprise-grade, dependency-free modules for modern web projects. In versions 1.4.0 and below, the getSecureRandomInt function in security-kit versions prior to 3.5.0 (packaged in Vision-ui <= 1.4.0) contains a critical cryptograp
- 9.8 Critical severity
wolfSSL: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
In the OpenSSL compatibility layer implementation, the function RAND_poll() was not behaving as expected and leading to the potential for predictable values returned from RAND_bytes() after fork() is called. This can lead to weak or predictable random numbers
- 7.3 High severity
Plack::Middleware::Session: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Plack-Middleware-Session before version 0.35 for Perl generates session ids insecurely. The default session id generator returns a SHA-1 hash seeded with the built-in rand function, the epoch time, and the PID. The PID will come from a small set of numbers, an
- 9.1 Critical severity
Mojolicious::Plugin::CaptchaPNG: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Mojolicious::Plugin::CaptchaPNG version 1.05 for Perl uses a weak random number source for generating the captcha. That version uses the built-in rand() function for generating the captcha text as well as image noise, which is insecure.
- 7.0 High severity
Mojolicious::Plugin::CSRF: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Mojolicious::Plugin::CSRF 1.03 for Perl uses a weak random number source for generating CSRF tokens. That version of the module generates tokens as an MD5 of the process id, the current time, and a single call to the built-in rand() function.
- 9.8 Critical severity
COMMGR: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Delta Electronics COMMGR v1 and v2 uses insufficiently randomized values to generate session IDs (CWE-338). An attacker could easily brute force a session ID and load and execute arbitrary code.
- 9.1 Critical severity
Jenkins jenkins/ssh-slave Docker images: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
In jenkins/ssh-slave Docker images based on Debian, SSH host keys are generated on image creation for images based on Debian, causing all containers based on images of the same version use the same SSH host keys, allowing attackers able to insert themselves in
- 9.1 Critical severity
Jenkins jenkins/ssh-agent Docker images: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
In jenkins/ssh-agent Docker images 6.11.1 and earlier, SSH host keys are generated on image creation for images based on Debian, causing all containers based on images of the same version use the same SSH host keys, allowing attackers able to insert themselves
- 7.7 High severity
Data::Entropy: Insufficient Entropy
Data::Entropy for Perl 0.007 and earlier use the rand() function as the default source of entropy, which is not cryptographically secure, for cryptographic functions.
- 8.8 High severity
langgenius/dify: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
A vulnerability in langgenius/dify v0.10.1 allows an attacker to take over any account, including administrator accounts, by exploiting a weak pseudo-random number generator (PRNG) used for generating password reset codes. The application uses `random.randint`
- 8.8 High severity
Crypt::Random: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Crypt::Random Perl package 1.05 through 1.55 may use rand() function, which is not cryptographically strong, for cryptographic functions. If the Provider is not specified and /dev/urandom or an Entropy Gathering Daemon (egd) service is not available Crypt::Ran
- 9.8 Critical severity
SonicOS: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in the SonicOS SSLVPN authentication token generator that, in certain cases, can be predicted by an attacker potentially resulting in authentication bypass.
- 7.5 High severity
Migration, Backup, Staging: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
The Migration, Backup, Staging WordPress plugin before 0.9.106 does not use sufficient randomness in the filename that is created when generating a backup, which could be bruteforced by attackers to leak sensitive information about said backups.
- 8.8 High severity
Pro: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
The goTenna Pro App does not use SecureRandom when generating passwords for sharing cryptographic keys. The random function in use makes it easier for attackers to brute force this password if the broadcasted encryption key is captured over RF. This only appli
- 9.1 Critical severity
Apache StreamPipes: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerability in Apache StreamPipes user self-registration and password recovery mechanism. This allows an attacker to guess the recovery token in a reasonable time and thereby to take over th
- 8.2 High severity
Bludit: Improper Authentication
Bludit uses predictable methods in combination with the MD5 hashing algorithm to generate sensitive tokens such as the API token and the user token. This allows attackers to authenticate against the Bludit API.
- 7.5 High severity
rt-thread: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
RT-Thread through 5.0.2 generates random numbers with a weak algorithm of "seed = 214013L * seed + 2531011L; return (seed >> 16) & 0x7FFF;" in calc_random in drivers/misc/rt_random.c.
- 7.5 High severity
Trust Wallet: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
The Binance Trust Wallet app for iOS in commit 3cd6e8f647fbba8b5d8844fcd144365a086b629f, git tag 0.0.4 misuses the trezor-crypto library and consequently generates mnemonic words for which the device time is the only entropy source, leading to economic losses,