SecurityContext

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

IdName
CWE-331Insufficient Entropy
CWE-338Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

References

Same in every row:

  • Source: nvd
  • Tags: Product
Url
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

Products

ProductAffectedPlatform boundSourcesUrl
lev:web::api<= 2.8nonvd/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