CVE-2024-57868
Web::API 2.8 and earlier for Perl uses insecure rand() function for cryptographic functions
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.5
Web::API 2.8 and earlier for Perl uses insecure rand() function for cryptographic functions
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.
- Record
CVE-2024-57868- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-338, CWE-331
- Updated
- 2026-11-02
EUVDEUVD-2024-54369
5.5
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.
- Record
EUVD-2024-54369- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-gfj4-2p4p-m25j
5.5
Web::API 2.8 and earlier for Perl uses the rand() function as the default source of entropy,...
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.
- Record
GHSA-gfj4-2p4p-m25j- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-331, CWE-338
- Updated
- 2026-11-02
NVD
5.5
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.
- Record
CVE-2024-57868- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-331, CWE-338
- Updated
- 2026-11-02
OSV
5.5
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.
- Record
CVE-2024-57868- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-57868
5.5
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.
- Record
DEBIAN-CVE-2024-57868- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-57868
5.5
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.
- Record
UBUNTU-CVE-2024-57868- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libweb-api-perlDebian:12 |
All versions, plus listed versions 2.7-22.7-32.8-1 |
None known |
libweb-api-perlDebian:13 |
All versions, plus listed versions 2.8-1 |
None known |
libweb-api-perlDebian:14 |
All versions, plus listed versions 2.8-1 |
None known |
libweb-api-perlUbuntu:18.04:LTS |
All versions, plus listed versions 2.2.3-1 |
None known |
libweb-api-perlUbuntu:20.04:LTS |
All versions, plus listed versions 2.4.1-12.5-12.6-1 |
None known |
libweb-api-perlUbuntu:22.04:LTS |
All versions, plus listed versions 2.7-1 |
None known |
libweb-api-perlUbuntu:24.04:LTS |
All versions, plus listed versions 2.7-22.7-3 |
None known |
libweb-api-perlUbuntu:25.10 |
All versions, plus listed versions 2.8-1 |
None known |
libweb-api-perlUbuntu:26.10 |
All versions, plus listed versions 2.8-1 |
None known |
libweb-api-perlUbuntu:26.04:LTS |
All versions, plus listed versions 2.8-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-57868 is a medium vulnerability (CVSS 5.5) in Lev Web::api, published April 5, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 24th percentile. No source names a fixed version.