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-22376: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

0
Medium
VulnerabilityCVE-2025-22376cvecve-2025-22376cwe-338
Published: Fri Jan 03 2025 (01/03/2025, 00:00:00 UTC)
Source: CVE Database V5

Description

CVE-2025-22376 is a medium severity vulnerability in the Net::OAuth::Client module of the Net::OAuth Perl package, where the default nonce is generated using the built-in rand() function, which is not cryptographically secure. This weak pseudo-random number generator (PRNG) can lead to predictable nonces, potentially enabling replay or other cryptographic attacks. The vulnerability does not impact confidentiality or integrity directly but may affect availability or the robustness of OAuth authentication flows. Exploitation does not require authentication or user interaction and can be performed remotely. No known exploits are currently reported in the wild. Organizations using affected versions of Net::OAuth should update or implement stronger nonce generation methods to mitigate risk. Countries with significant Perl usage in critical infrastructure or software development are more likely to be affected. The CVSS score is 5. 3, reflecting a medium severity level due to limited impact scope and ease of exploitation.

AI-Powered Analysis

AILast updated: 02/25/2026, 22:11:05 UTC

Technical Analysis

CVE-2025-22376 identifies a cryptographic weakness in the Net::OAuth::Client component of the Net::OAuth Perl package prior to version 0.29. The vulnerability arises because the default nonce value, which is critical for preventing replay attacks in OAuth authentication, is generated using Perl's built-in rand() function. This function is not designed to be cryptographically secure and produces predictable pseudo-random numbers. As a result, attackers may predict nonce values, undermining the security guarantees of the OAuth protocol implementation. Although the vulnerability does not directly compromise confidentiality or integrity, it weakens the authentication mechanism's robustness, potentially allowing replay attacks or other misuse of OAuth tokens. The vulnerability is remotely exploitable without authentication or user interaction, increasing its risk profile. No patches or exploits are currently documented, but the issue is recognized and published with a CVSS 3.1 base score of 5.3, indicating medium severity. The CWE classification is CWE-338, highlighting the use of a weak PRNG. The affected versions are unspecified but pertain to versions before 0.29 of the Net::OAuth package. This vulnerability underscores the importance of using cryptographically secure random number generators for security-critical values such as nonces in authentication protocols.

Potential Impact

The primary impact of this vulnerability is the potential for attackers to predict nonce values used in OAuth authentication flows, which could facilitate replay attacks or token misuse. While it does not directly expose sensitive data or allow unauthorized data modification, the weakening of nonce unpredictability can degrade the overall security posture of systems relying on Net::OAuth for authentication. This may lead to denial of service or unauthorized access scenarios if attackers successfully replay or forge authentication requests. Organizations using the affected Perl package in web services, APIs, or other OAuth-dependent systems could face increased risk of authentication bypass or session hijacking attempts. The vulnerability's medium severity reflects its limited direct impact on confidentiality and integrity but acknowledges the risk to availability and authentication robustness. The lack of known exploits reduces immediate risk but does not eliminate the potential for future attacks, especially in environments where OAuth is critical for access control.

Mitigation Recommendations

To mitigate this vulnerability, organizations should upgrade to Net::OAuth version 0.29 or later, where nonce generation uses a cryptographically secure random number generator. If upgrading is not immediately feasible, developers should override the default nonce generation method to use a secure PRNG, such as those provided by Perl modules like Crypt::PRNG or by interfacing with system-level secure random sources (e.g., /dev/urandom). Additionally, implementing nonce tracking and validation mechanisms on the server side can help detect and prevent replay attacks. Security teams should audit OAuth implementations to ensure all cryptographic elements, including nonces, tokens, and keys, use strong randomness sources. Monitoring for unusual authentication patterns and applying rate limiting can further reduce exploitation risk. Finally, maintain awareness of updates from the Net::OAuth project and apply patches promptly when available.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2025-01-03T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699f6b1bb7ef31ef0b54e2ea

Added to database: 2/25/2026, 9:35:23 PM

Last enriched: 2/25/2026, 10:11:05 PM

Last updated: 2/26/2026, 7:22:50 AM

Views: 1

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 more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats