HIGH 7.5

CVE-2026-9638: Crypt::PBKDF2 Insecure Salt Generation (CVSS 7.5)

Crypt::PBKDF2 is a Perl library that implements PBKDF2, a password-based key derivation function widely used to securely hash and store passwords. Versions before 0.261630 contain a critical flaw: they generate salt values—random numbers meant to make each password hash unique—using Perl's built-in rand() function, which is mathematically predictable and fundamentally unsuitable for cryptographic use. An attacker who knows or can predict the salt can dramatically accelerate password cracking attacks, defeating the security benefits of PBKDF2.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weaknesses (CWE)
CWE-338
Affected products
0 configuration(s)
Published / Modified
2026-06-12 / 2026-06-17

NVD description (verbatim)

Crypt::PBKDF2 versions before 0.261630 for Perl generate insecure random values for salts. These versions use the built-in rand function, which is predictable and unsuitable for cryptography.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from improper random number generation (CWE-338). PBKDF2 requires cryptographically secure random salts to ensure each password hash is distinct and resistant to precomputation attacks. Crypt::PBKDF2 before version 0.261630 derives salts from Perl's rand() function, which is seeded from predictable sources and designed for statistical randomness, not cryptographic unpredictability. An attacker with knowledge of the seeding mechanism or state can reproduce the same salts and use precomputed rainbow tables or optimized crack attempts against the hashed passwords. The vulnerability affects confidentiality of password hashes; integrity and availability are not directly impacted.

Business impact

Applications relying on Crypt::PBKDF2 for password storage are exposed to accelerated credential compromise. If an attacker obtains a database of password hashes generated by vulnerable versions, they can use predicted salts to execute dictionary and brute-force attacks far more efficiently than intended. This enables account takeovers, lateral movement, and potential regulatory violations if the application stores personal data covered by privacy laws (GDPR, CCPA, HIPAA). Organizations using this library in authentication, session management, or secrets derivation should treat this as a high-priority patching incident.

Affected systems

Any Perl application using Crypt::PBKDF2 version 0.261629 or earlier is affected. This includes web applications, command-line tools, system utilities, and services that rely on this library for password hashing or cryptographic key derivation. The vulnerable library is available on CPAN (Comprehensive Perl Archive Network) and may be installed as a direct dependency or as a transitive dependency of other Perl modules. Systems should be inventoried to identify all instances of this package and its dependents.

Exploitability

The vulnerability requires the attacker to obtain password hashes (via database breach, configuration leak, or memory dump), but does not require authentication, network interaction during exploitation, or user interaction. Once hashes are obtained, exploitation is straightforward: an attacker can predict salts and apply precomputed or optimized cracking techniques. There is no known public exploit code, and the vulnerability is not yet on CISA's Known Exploited Vulnerabilities list; however, the technical barrier to exploitation is low and the impact is severe.

Remediation

Upgrade Crypt::PBKDF2 to version 0.261630 or later. This version corrects salt generation to use cryptographically secure random sources (typically Crypt::OpenSSL::Random or Crypt::Random on most Perl installations). After patching, consider regenerating password hashes for existing users during their next login or via a scheduled re-hashing process. Organizations should audit logs to determine if passwords were exposed during the window when vulnerable versions were in use.

Patch guidance

Update Crypt::PBKDF2 to version 0.261630 or later using your package manager (cpan, cpanm, or your distribution's Perl module repository). Verify the updated version is installed: perl -e 'use Crypt::PBKDF2; print $Crypt::PBKDF2::VERSION' should report 0.261630 or higher. Test your application thoroughly in a staging environment before deploying to production, as cryptographic library updates can occasionally affect serialization or compatibility. Once patched, ensure new password hashes use the corrected salt generation; consider a phased re-hashing of existing hashes as users log in.

Detection guidance

Identify installed Perl modules: use cpan or cpanm to list installed versions of Crypt::PBKDF2. On systems with package managers, grep /usr/share/perl or search cpan.org for installed version metadata. If source code is available, search for use Crypt::PBKDF2 in .pm and .pl files. Monitor Perl error logs and application startup logs for any deprecation warnings related to rand(). Consider a configuration management scan (Puppet, Ansible, Chef) to detect vulnerable versions across infrastructure. Correlate module installation timestamps with password hash creation dates to estimate exposure window.

Why prioritize this

This vulnerability merits immediate attention due to its high CVSS score (7.5), direct impact on password security, and the low effort required to exploit once hashes are obtained. While not yet in CISA's KEV list, the technical simplicity and widespread use of PBKDF2 in authentication systems make this a strong candidate for active exploitation. Organizations that have experienced any credential breach or have customer-facing authentication systems should prioritize this patch within days, not weeks.

Risk score, explained

CVSS 3.1 score of 7.5 (HIGH) reflects a network-accessible vulnerability with no authentication or user interaction required for an attacker to prepare an exploit, combined with high confidentiality impact (C:H). The attack complexity is low because predicting salts requires only knowledge of Perl's rand() implementation and potentially the seeding state. Integrity and availability are not impacted (I:N, A:N), preventing a critical rating. The severity is elevated by the ubiquity of password authentication and the fact that compromise of stored hashes can lead to widespread account takeovers.

Frequently asked questions

Does this vulnerability allow remote code execution?

No. This vulnerability enables an attacker who has obtained password hashes to crack them more efficiently by predicting the salt values. It does not directly allow code execution, but successful password compromise can lead to account takeover and potential lateral movement depending on the target system's architecture.

If we use Crypt::PBKDF2 but never extract or log salts, are we safe?

No. The salt is generated internally by the library during hashing. Even if your application does not explicitly handle salts, the vulnerable rand()-based generation still weakens the security of stored password hashes. You must upgrade the library.

Is this vulnerability in the Perl interpreter itself?

No. This is a vulnerability in the Crypt::PBKDF2 Perl module, not in Perl core. The issue is that the module chose to use rand() instead of a cryptographically secure random number generator. Other Perl modules and most modern libraries use Crypt::Random or similar alternatives.

What if we have already stored hashes with the vulnerable version?

Hashes already stored are now vulnerable to more efficient cracking. After upgrading, you should regenerate those hashes. A common approach is to re-hash existing passwords when users next log in. For highly sensitive accounts or systems that have experienced a breach, consider forcing password resets.

This analysis is provided for informational purposes and does not constitute professional security advice. Organizations should conduct their own risk assessment in the context of their infrastructure, data classification, and threat model. Patch versions and guidance should be verified against official vendor advisories and release notes. SEC.co assumes no liability for the accuracy of third-party version information or for outcomes of patching decisions. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).