Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-1828: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in perl Crypt::Random

0
High
VulnerabilityCVE-2025-1828cvecve-2025-1828cwe-338cwe-331
Published: Mon Mar 10 2025 (03/10/2025, 23:51:33 UTC)
Source: CVE Database V5
Vendor/Project: perl
Product: Crypt::Random

Description

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::Random will default to use the insecure Crypt::Random::rand provider. In particular, Windows versions of perl will encounter this issue by default.

AI-Powered Analysis

AILast updated: 09/12/2025, 23:49:53 UTC

Technical Analysis

CVE-2025-1828 identifies a critical vulnerability in the Perl Crypt::Random package versions 1.05 through 1.55, where the module may rely on the standard rand() function for cryptographic operations if no secure entropy source is specified. The rand() function is not designed to be cryptographically secure and can produce predictable pseudo-random outputs, which undermines the security of any cryptographic processes depending on it. Specifically, if the Crypt::Random provider is not explicitly set and neither /dev/urandom (common on Unix-like systems) nor an Entropy Gathering Daemon (egd) service is available, the module defaults to using the insecure Crypt::Random::rand provider. This issue is particularly prevalent on Windows systems running Perl, as they often lack access to /dev/urandom and may not have an egd service, causing them to default to the weak PRNG. The vulnerability is classified under CWE-338 (Use of Cryptographically Weak PRNG) and CWE-331 (Insufficient Entropy). The CVSS 3.1 base score is 8.8 (high severity), reflecting the network attack vector, low attack complexity, no privileges required, but user interaction is needed, and a significant impact on confidentiality, integrity, and availability. Exploiting this vulnerability could allow attackers to predict cryptographic keys, session tokens, or other sensitive values generated by Crypt::Random, leading to potential data breaches, unauthorized access, or system compromise. Although no known exploits are currently reported in the wild, the high severity and ease of exploitation make this a critical concern for applications relying on this Perl module for cryptographic randomness.

Potential Impact

For European organizations, this vulnerability poses a substantial risk, especially those using Perl-based applications or services that depend on Crypt::Random for cryptographic operations such as key generation, token creation, or secure communications. The use of a weak PRNG can lead to predictable cryptographic outputs, enabling attackers to compromise encrypted data, impersonate users, or escalate privileges. This can result in breaches of sensitive personal data protected under GDPR, leading to regulatory penalties and reputational damage. Sectors such as finance, healthcare, government, and critical infrastructure that rely on Perl scripts for automation or security functions are particularly vulnerable. Moreover, Windows-based environments are more exposed due to the default fallback to the insecure PRNG, increasing the attack surface. The vulnerability could also undermine secure communications and authentication mechanisms, potentially allowing attackers to intercept or manipulate data flows within European enterprises.

Mitigation Recommendations

European organizations should take immediate steps to mitigate this vulnerability beyond generic patching advice. First, audit all Perl applications and scripts to identify usage of the Crypt::Random module, especially on Windows platforms. Explicitly configure Crypt::Random to use secure entropy sources such as /dev/urandom or an Entropy Gathering Daemon (egd) where available. For Windows systems, consider deploying or configuring a secure entropy provider compatible with Crypt::Random or switch to alternative cryptographic libraries that do not rely on weak PRNGs. Implement strict code review policies to ensure no fallback to insecure PRNGs occurs. Additionally, monitor cryptographic key generation processes for anomalies and consider reissuing keys or tokens generated during the vulnerable period. Organizations should also educate developers about the risks of using non-cryptographically secure random functions in security-sensitive contexts. Finally, maintain up-to-date Perl environments and apply patches as soon as they become available from the vendor or community.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
CPANSec
Date Reserved
2025-03-01T15:39:14.682Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68bae6eb9bc4cbad54150db9

Added to database: 9/5/2025, 1:34:35 PM

Last enriched: 9/12/2025, 11:49:53 PM

Last updated: 10/22/2025, 7:18:43 AM

Views: 33

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats