CVE-2024-57868: Web::API - Weak Random Number Generation
- Cve: CVE-2024-57868
- Name: Web::API - Weak Random Number Generation
- 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.
- Impact: Attackers can predict or reproduce random values, potentially compromising cryptographic security or session integrity.
- Remediation: Update to a version that uses a cryptographically secure random source or replace Data::Random with a secure alternative.
- Vulnerability type: weak_cryptography
- Vulnerability impact: information_disclosure, data_tampering
- Requirements: Attacker must observe or influence random generation
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
- Epss score: 0.00312
- Epss percentile: 0.24223
- Assignee: 9b29abf9-4ab0-4765-b253-1875cd9b441e
- Published at: 2025-04-05T16:15:33Z
- Age in days: 598
- Modified at: 2026-06-17T08:14:06Z
- References total: 5
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-57868
- Nvd status: analyzed
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
- Not known: requirement type, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-331 | Insufficient Entropy |
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) |
References
Same in every row:
- Source: nvd
- Tags: Product
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| lev:web::api | <= 2.8 | no | nvd | /v1/products/lev/web::api |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts