Crypt::ScryptKDF Insecure Random Number Generation Vulnerability

Vulnerability

A vulnerability exists in Crypt::ScryptKDF versions prior to 0.010 for Perl, where the module relies on an insecure random number source when no cryptographically secure random number generator (CSPRNG) module is available. The random_bytes function defaulted to the built-in rand() function, which is not secure, if none of the following Perl modules were installed: Crypt::PRNG, Crypt::OpenSSL::Random, Net::SSLeay, Crypt::Random, or Bytes::Random::Secure.

Impact

Exploitation of this vulnerability leads to the use of an insecure random number generator, which can compromise the cryptographic strength of operations that rely on random bytes, such as key derivation and password hashing.

Reproduction

To reproduce this vulnerability, use Crypt::ScryptKDF in a Perl environment where none of the recommended CSPRNG modules are installed. Call the random_bytes function, which will then fall back to the insecure rand() function, generating random bytes that are not cryptographically secure.

Remediation

Users can update to Crypt::ScryptKDF version 0.011 or later, where this vulnerability has been fixed.

Added: May 26, 2026, 11:39 PM
Updated: May 26, 2026, 11:39 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.6
exploitability
8.0
remediation
0.0
relevance
9.6
threat
4.8
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.