CVE-2025-40905: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in DBOOK WWW::OAuth
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.
AI Analysis
Technical Summary
CVE-2025-40905 identifies a cryptographic weakness in the DBOOK WWW::OAuth Perl module, specifically versions 1.000 and earlier. The vulnerability arises because the module uses Perl's built-in rand() function as the default source of entropy for cryptographic operations. The rand() function is designed for general-purpose pseudo-random number generation and is not suitable for cryptographic use due to its predictability and lack of sufficient entropy. This weakness falls under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG). The insecure PRNG can lead to predictable cryptographic keys, tokens, or nonces generated by the module, undermining the security guarantees of OAuth implementations that rely on it. The vulnerability is remotely exploitable without any authentication or user interaction, meaning an attacker can potentially predict or reproduce cryptographic values to compromise confidentiality, integrity, or availability of the affected system. The CVSS v3.1 base score of 7.3 reflects high severity, with attack vector network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts on confidentiality, integrity, and availability (C:L/I:L/A:L). No official patches are currently listed, so mitigation requires code changes or configuration adjustments. The vulnerability was reserved in April 2025 and published in February 2026, with no known exploits in the wild as of now. This issue highlights the critical importance of using cryptographically secure PRNGs in security-sensitive modules, especially those handling OAuth tokens and credentials.
Potential Impact
The use of a weak PRNG in WWW::OAuth can lead to predictable OAuth tokens, session identifiers, or cryptographic keys, allowing attackers to impersonate users, hijack sessions, or forge authentication tokens. This compromises confidentiality by exposing sensitive data, integrity by enabling token manipulation, and availability if attackers disrupt authentication flows. Since the vulnerability is exploitable remotely without authentication or user interaction, it poses a significant risk to any organization using the affected module in their OAuth implementations. This can affect web applications, APIs, and services relying on Perl-based OAuth libraries, potentially leading to unauthorized access, data breaches, and service disruptions. The widespread use of Perl in legacy systems and certain web infrastructures increases the scope of impact. Organizations in sectors such as finance, healthcare, government, and technology that depend on OAuth for secure authentication are particularly vulnerable. The absence of known exploits currently provides a window for proactive mitigation before active exploitation occurs.
Mitigation Recommendations
Organizations should immediately audit their use of the WWW::OAuth Perl module to determine if they are using version 1.000 or earlier. Since no official patches are currently available, developers should modify the source code to replace the use of Perl's rand() function with a cryptographically secure PRNG, such as those provided by the Crypt::PRNG or Crypt::Random modules. Additionally, review all cryptographic operations within the module to ensure they rely on secure entropy sources. If feasible, migrate to alternative OAuth libraries that adhere to modern cryptographic standards and have active maintenance. Implement runtime monitoring and anomaly detection to identify suspicious OAuth token usage or authentication anomalies. Educate development teams on the importance of using secure random number generators in cryptographic contexts. Finally, maintain vigilance for official patches or updates from the vendor and apply them promptly once available.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, Japan, India, Netherlands, Sweden, Brazil, South Korea
CVE-2025-40905: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in DBOOK WWW::OAuth
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-40905 identifies a cryptographic weakness in the DBOOK WWW::OAuth Perl module, specifically versions 1.000 and earlier. The vulnerability arises because the module uses Perl's built-in rand() function as the default source of entropy for cryptographic operations. The rand() function is designed for general-purpose pseudo-random number generation and is not suitable for cryptographic use due to its predictability and lack of sufficient entropy. This weakness falls under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG). The insecure PRNG can lead to predictable cryptographic keys, tokens, or nonces generated by the module, undermining the security guarantees of OAuth implementations that rely on it. The vulnerability is remotely exploitable without any authentication or user interaction, meaning an attacker can potentially predict or reproduce cryptographic values to compromise confidentiality, integrity, or availability of the affected system. The CVSS v3.1 base score of 7.3 reflects high severity, with attack vector network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts on confidentiality, integrity, and availability (C:L/I:L/A:L). No official patches are currently listed, so mitigation requires code changes or configuration adjustments. The vulnerability was reserved in April 2025 and published in February 2026, with no known exploits in the wild as of now. This issue highlights the critical importance of using cryptographically secure PRNGs in security-sensitive modules, especially those handling OAuth tokens and credentials.
Potential Impact
The use of a weak PRNG in WWW::OAuth can lead to predictable OAuth tokens, session identifiers, or cryptographic keys, allowing attackers to impersonate users, hijack sessions, or forge authentication tokens. This compromises confidentiality by exposing sensitive data, integrity by enabling token manipulation, and availability if attackers disrupt authentication flows. Since the vulnerability is exploitable remotely without authentication or user interaction, it poses a significant risk to any organization using the affected module in their OAuth implementations. This can affect web applications, APIs, and services relying on Perl-based OAuth libraries, potentially leading to unauthorized access, data breaches, and service disruptions. The widespread use of Perl in legacy systems and certain web infrastructures increases the scope of impact. Organizations in sectors such as finance, healthcare, government, and technology that depend on OAuth for secure authentication are particularly vulnerable. The absence of known exploits currently provides a window for proactive mitigation before active exploitation occurs.
Mitigation Recommendations
Organizations should immediately audit their use of the WWW::OAuth Perl module to determine if they are using version 1.000 or earlier. Since no official patches are currently available, developers should modify the source code to replace the use of Perl's rand() function with a cryptographically secure PRNG, such as those provided by the Crypt::PRNG or Crypt::Random modules. Additionally, review all cryptographic operations within the module to ensure they rely on secure entropy sources. If feasible, migrate to alternative OAuth libraries that adhere to modern cryptographic standards and have active maintenance. Implement runtime monitoring and anomaly detection to identify suspicious OAuth token usage or authentication anomalies. Educate development teams on the importance of using secure random number generators in cryptographic contexts. Finally, maintain vigilance for official patches or updates from the vendor and apply them promptly once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2025-04-16T09:05:34.360Z
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 698e66f8c9e1ff5ad82e611b
Added to database: 2/12/2026, 11:49:12 PM
Last enriched: 2/20/2026, 8:23:46 AM
Last updated: 3/30/2026, 5:44:34 AM
Views: 155
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.