Skip to main content

CVE-2025-27551: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in WREIS DBIx::Class::EncodedColumn

Medium
VulnerabilityCVE-2025-27551cvecve-2025-27551cwe-338cwe-916cwe-331
Published: Wed Mar 26 2025 (03/26/2025, 11:07:43 UTC)
Source: CVE Database V5
Vendor/Project: WREIS
Product: DBIx::Class::EncodedColumn

Description

DBIx::Class::EncodedColumn use the rand() function, which is not cryptographically secure to salt password hashes. This vulnerability is associated with program files lib/DBIx/Class/EncodedColumn/Digest.pm. This issue affects DBIx::Class::EncodedColumn until 0.00032.

AI-Powered Analysis

AILast updated: 09/05/2025, 13:35:42 UTC

Technical Analysis

CVE-2025-27551 identifies a cryptographic weakness in the WREIS DBIx::Class::EncodedColumn Perl module, specifically in versions up to 0.00032. The vulnerability arises from the use of the standard rand() function to generate salts for password hashing. The rand() function is a general-purpose pseudo-random number generator (PRNG) that is not designed to be cryptographically secure. Consequently, salts generated using rand() can be predictable or reproducible by attackers, undermining the effectiveness of password hashing. This weakness is located in the program file lib/DBIx/Class/EncodedColumn/Digest.pm. Salts are critical in password hashing to ensure that identical passwords produce different hashes and to defend against precomputed hash attacks such as rainbow tables. Using a weak PRNG for salt generation compromises this defense, potentially allowing attackers to more easily reverse or guess password hashes. The vulnerability is classified under CWE-338 (Use of Cryptographically Weak PRNG), CWE-916 (Use of Password-Based Cryptography), and CWE-331 (Insufficient Entropy). The CVSS v3.1 score is 4.0 (medium severity), reflecting that exploitation requires local access (AV:L), low attack complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N). The impact is limited to confidentiality loss, with no integrity or availability impact. No known exploits are currently reported in the wild, and no patches are linked yet, indicating that remediation may require updating the module to a version that replaces rand() with a cryptographically secure random number generator (CSPRNG).

Potential Impact

For European organizations using the DBIx::Class::EncodedColumn module in their Perl-based applications, this vulnerability poses a risk to the confidentiality of user credentials. If an attacker gains local access to the system or can execute code within the application environment, they may predict or reproduce salts used in password hashes, facilitating offline password cracking attacks. This could lead to unauthorized access to user accounts and potentially escalate to further compromise depending on the application context. Although the vulnerability does not directly affect system integrity or availability, the exposure of credentials can have significant reputational and regulatory consequences, especially under GDPR requirements for protecting personal data. Organizations in sectors with high security demands, such as finance, healthcare, and government, may face increased risk if this module is part of their authentication infrastructure. The medium severity rating suggests that while the threat is not critical, it should be addressed promptly to prevent exploitation.

Mitigation Recommendations

European organizations should audit their use of the DBIx::Class::EncodedColumn module to determine if affected versions (up to 0.00032) are in use. Immediate mitigation steps include: 1) Upgrading to a patched or newer version of the module that uses a cryptographically secure random number generator (such as those provided by Crypt::Random or similar Perl modules) for salt generation. 2) If no patch is available, modifying the source code to replace rand() calls with a CSPRNG-based function for salt creation. 3) Conducting a password reset campaign for users if there is suspicion of credential compromise. 4) Enhancing monitoring for unusual authentication attempts or local access that might indicate exploitation attempts. 5) Reviewing overall password hashing mechanisms to ensure use of strong algorithms (e.g., bcrypt, Argon2) combined with secure salts. 6) Implementing strict access controls to limit local access to systems running vulnerable software. These steps go beyond generic advice by focusing on the specific weakness in salt generation and emphasizing code-level remediation and operational controls.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
CPANSec
Date Reserved
2025-02-28T20:33:23.575Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68bae6eb9bc4cbad54150dbe

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

Last enriched: 9/5/2025, 1:35:42 PM

Last updated: 9/5/2025, 1:35:42 PM

Views: 2

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

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