CVE-2026-8647
Insecure Random Number Generation in Crypt::ScryptKDF Perl Module
Publication date: 2026-05-26
Last updated on: 2026-05-26
Assigner: CPANSec
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-338 | The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in Crypt::ScryptKDF versions through 0.010 for Perl, where the module uses an insecure random number source if no cryptographically secure pseudorandom number generator (CSPRNG) module is available.
Specifically, the random_bytes function falls back to using Perl's built-in rand() function when none of the secure random modules such as Crypt::PRNG, Crypt::OpenSSL::Random, Net::SSLeay, Crypt::Random, or Bytes::Random::Secure are present.
Since rand() is not cryptographically secure, this fallback results in weak randomness, which can compromise the security of cryptographic operations relying on this module.
How can this vulnerability impact me? :
The impact of this vulnerability is that cryptographic keys or other security-critical values generated by Crypt::ScryptKDF may be predictable or guessable due to the use of an insecure random number source.
This can lead to weakened encryption, making it easier for attackers to break the cryptographic protections, potentially resulting in unauthorized data access or compromise.