Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
AC:H because both Crypt::URandom and Bytes::Random::Secure must be absent; hash acquisition is also a prerequisite before offline cracking yields C:H.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionCVE.org
Apache::API::Password versions through v0.5.2 for Perl can generate insecure random values for salts.
The _make_salt and _make_salt_bcrypt methods will attept to load Crypt::URandom and then Bytes::Random::Secure to generate random bytes for the salt. If those modules are unavailable, it will simply return 16 bytes generated with Perl's built-in rand function.
The rand function is unsuitable for cryptographic use.
These salts are used for password hashing.
AnalysisAI
Cryptographically weak password salts in Apache::API::Password (Perl, CPAN) through v0.5.2 allow offline dictionary attacks against hashed credentials when optional secure-random modules are absent. The library's _make_salt and _make_salt_bcrypt methods silently fall back to Perl's built-in rand() - a non-cryptographic PRNG - if both Crypt::URandom and Bytes::Random::Secure are unavailable at runtime, producing predictable salt values that dramatically reduce the search space for password cracking. No public exploit code and no confirmed active exploitation are recorded; EPSS is 0.02% (4th percentile), consistent with a configuration-dependent cryptographic weakness rather than a directly triggerable remote flaw.
Technical ContextAI
Apache::API::Password (CPE: cpe:2.3:a:jdeguest:apache::api::password:*:*:*:*:*:*:*:*) is a Perl CPAN module (vendor: JDEGUEST) that provides password hashing services - including bcrypt - for applications built on the Apache2::API framework. The root cause is CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator). The library implements a module-preference chain for randomness: it first attempts to load Crypt::URandom (OS-entropy wrapper) and then Bytes::Random::Secure (CSPRNG). Only if both are absent does it fall back to rand(), which in Perl is a linear congruential generator seeded from a low-entropy source and is explicitly documented as unsuitable for security purposes. Because salts are intended to prevent rainbow-table and precomputed attacks, a predictable salt space collapses the security guarantee of even a strong hash algorithm like bcrypt. The referenced CPANSec guidance at security.metacpan.org and the Crypt::URandom documentation confirm the recommended practice that the library fails to enforce.
RemediationAI
Upgrade to Apache2-API v0.5.3 or later via CPAN (cpan Apache2::API or cpanm Apache2::API), which resolves the insecure fallback. The vendor changelog at https://metacpan.org/release/JDEGUEST/Apache2-API-v0.5.3/changes documents the fix. As a workaround prior to patching, install Crypt::URandom (cpanm Crypt::URandom) - it is a minimal pure-Perl module with no compiled dependencies that provides OS-level entropy on Linux, macOS, and Windows - which will satisfy the library's first preference and prevent the insecure rand() fallback from ever firing. Installing Bytes::Random::Secure is an equally valid workaround. Operators should also audit whether any salts generated by the vulnerable code path are already in use: if so, forcing a password-reset cycle for affected users is advisable, since previously stored hashes may have been generated with weak salts. No side effects from the upgrade are anticipated for correctly configured deployments.
The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl before 5.17.7 does not properly hand
Stack-based buffer overflow in the CPerlHost::Add method in win32/perlhost.h in Perl before 5.24.3-RC1 and 5.26.x before
The VDir::MapPathA and VDir::MapPathW functions in Perl 5.22 allow remote attackers to cause a denial of service (out-of
Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations. Rated
Perl before 5.26.3 and 5.28.0 before 5.28.1 has a buffer overflow via a crafted regular expression that triggers invalid
Perl before 5.26.3 has a buffer over-read via a crafted regular expression that triggers disclosure of sensitive informa
Perl might allow context-dependent attackers to bypass the taint protection mechanism in a child process via duplicate e
CPAN.pm before 2.35 does not verify TLS certificates when downloading distributions over HTTPS. Rated high severity (CVS
The XSLoader::load method in XSLoader in Perl does not properly locate .so files when called in a string eval, which mig
In Perl through 5.26.2, the Archive::Tar module allows remote attackers to bypass a directory-traversal protection mecha
The (1) S_reghop3, (2) S_reghop4, and (3) S_reghopmaybe3 functions in regexec.c in Perl before 5.24.0 allow context-depe
Buffer overflow in the S_grok_bslash_N function in regcomp.c in Perl 5 before 5.24.3-RC1 and 5.26.x before 5.26.1-RC1 al
Same technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-22840