CVE-2026-5088
Insecure Random Salt Generation in Apache::API::Password v
Publication date: 2026-04-15
Last updated on: 2026-05-06
Assigner: CPANSec
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| jdeguest | apache | to 0.5.3 (exc) |
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?
The vulnerability in Apache::API::Password versions through v0.5.2 for Perl involves the generation of insecure random values for salts used in password hashing.
The methods _make_salt and _make_salt_bcrypt try to use Crypt::URandom and Bytes::Random::Secure modules to generate random bytes for salts. However, if these modules are not available, the methods fall back to using Perl's built-in rand function.
The rand function is not suitable for cryptographic purposes, meaning the salts generated this way are predictable and weak, which compromises the security of password hashes.
How can this vulnerability impact me? :
This vulnerability can lead to weak password hashing because the salts used may be predictable if generated by Perl's rand function.
Predictable salts reduce the effectiveness of password hashing by making it easier for attackers to perform precomputed attacks such as rainbow table attacks or other forms of hash cracking.
As a result, user passwords may be more easily compromised, leading to unauthorized access and potential data breaches.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability arises when Apache::API::Password versions through v0.5.2 for Perl generate salts using Perl's built-in rand function instead of secure random sources. To detect this on your system, you should check if the Crypt::URandom or Bytes::Random::Secure Perl modules are installed and being used by the application.
You can verify the presence of Crypt::URandom by running the following command in your Perl environment:
- perl -MCrypt::URandom -e 'print "Crypt::URandom is installed\n";'
If this command fails, it indicates Crypt::URandom is not installed, and the application may fall back to using the insecure rand function.
Additionally, you can inspect the application code or logs to see if the _make_salt or _make_salt_bcrypt methods are loading these modules or falling back to rand.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, ensure that the Crypt::URandom or Bytes::Random::Secure Perl modules are installed and available to Apache::API::Password.
Installing Crypt::URandom (version 0.55 or later) provides a secure source of randomness by interfacing with native cryptographic libraries and system calls, preventing the fallback to the insecure rand function.
- Install Crypt::URandom using CPAN or cpanm: cpanm Crypt::URandom
- Verify that your Perl environment and application can load Crypt::URandom successfully.
If updating or installing these modules is not immediately possible, consider restricting access to the affected system and monitoring for suspicious activity related to password hashing.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability in Apache::API::Password versions through v0.5.2 for Perl involves generating insecure random values for salts used in password hashing. Since the salts may be generated using Perl's built-in rand function, which is unsuitable for cryptographic use, this weakens the security of password hashes.
Weak password hashing mechanisms can lead to easier compromise of stored passwords, increasing the risk of unauthorized access to personal or sensitive data.
Such security weaknesses can negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require appropriate technical measures to protect personal and health information, including strong authentication and data protection practices.