What’s Vulnerable › Vulnerabilities
CVE-2024-57868: Web::API 2.8 and earlier for Perl uses insecure rand() function for cryptographic functions
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-04-05 · updated 2026-06-17
- Weakness: CWE-331
Description
Web::API 2.8 and earlier for Perl uses the rand() function as the default source of entropy, which is not cryptographically secure, for cryptographic functions. Specifically Web::API uses the Data::Random library which specifically states that it is "Useful mostly for test programs". Data::Random uses the rand() function.
Affected products
- LEV Web::Api: through 2.8
References
- https://metacpan.org/dist/Web-API/source/lib/Web/API.pm#L20
- https://metacpan.org/dist/Web-API/source/lib/Web/API.pm#L348
- https://metacpan.org/release/BAREFOOT/Data-Random-0.13/source/lib/Data/Random.pm#L537
- https://perldoc.perl.org/functions/rand
- https://security.metacpan.org/docs/guides/random-data-for-security.html
Get alerted when CVE-2024-57868 or the next vulnerability affects your stack