{"id":"CVE-2024-57868","aliases":["DEBIAN-CVE-2024-57868","EUVD-2024-54369","GHSA-gfj4-2p4p-m25j","UBUNTU-CVE-2024-57868"],"status":"published","title":"Web::API 2.8 and earlier for Perl uses insecure rand() function for cryptographic functions","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.\n\nSpecifically Web::API uses the Data::Random library which specifically states that it is \"Useful mostly for test programs\". Data::Random uses the rand() function.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-11","score":0.00312,"percentile":0.2433,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-331","CWE-338"],"published":"2025-04-05T15:35:05Z","modified":"2026-11-02T12:03:11Z","affected":[{"source":"osv","ecosystem":"Debian:12","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7-2","2.7-3","2.8-1"]},{"source":"osv","ecosystem":"Debian:13","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8-1"]},{"source":"osv","ecosystem":"Debian:14","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8-1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.3-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.4.1-1","2.5-1","2.6-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7-2","2.7-3"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libweb-api-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8-1"]}],"products":[{"vendor":"lev","product":"web::api"},{"vendor":"lev","product":"web\\"}],"references":[{"url":"https://perldoc.perl.org/functions/rand","tags":["Product","web","report"]},{"url":"https://security.metacpan.org/docs/guides/random-data-for-security.html","tags":["Product","web","report"]},{"url":"https://metacpan.org/release/BAREFOOT/Data-Random-0.13/source/lib/Data/Random.pm#L537","tags":["Product","web","report"]},{"url":"https://metacpan.org/dist/Web-API/source/lib/Web/API.pm#L20","tags":["Product","web","report"]},{"url":"https://metacpan.org/dist/Web-API/source/lib/Web/API.pm#L348","tags":["Product","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-57868"},{"url":"https://github.com/advisories/GHSA-gfj4-2p4p-m25j"},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-57868","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-57868","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-57868","tags":["report"]},{"url":"https://lists.security.metacpan.org/cve-announce/msg/28503730/","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-57868","title":"Web::API 2.8 and earlier for Perl uses insecure rand() function for cryptographic functions","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.\n\nSpecifically Web::API uses the Data::Random library which specifically states that it is \"Useful mostly for test programs\". Data::Random uses the rand() function.","status":"published","published":"2025-04-05T15:35:05.802Z","modified":"2025-09-05T13:18:59.781Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium","assessor":"adp"}],"cwes":["CWE-338","CWE-331"],"updated_at":"2026-11-02T14:34:07.482552Z"}],"euvd":[{"id":"EUVD-2024-54369","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.\n\nSpecifically Web::API uses the Data::Random library which specifically states that it is \"Useful mostly for test programs\". Data::Random uses the rand() function.","status":"published","published":"2025-04-05T15:35:05Z","modified":"2025-09-05T13:18:59Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T20:31:46.9428Z"}],"ghsa":[{"id":"GHSA-gfj4-2p4p-m25j","title":"Web::API 2.8 and earlier for Perl uses the rand() function as the default source of entropy,...","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.\n\nSpecifically Web::API uses the Data::Random library which specifically states that it is \"Useful mostly for test programs\". Data::Random uses the rand() function.","status":"published","published":"2025-04-07T15:31:10Z","modified":"2025-09-05T15:31:07Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-331","CWE-338"],"updated_at":"2026-11-02T15:03:29.995439Z"}],"nvd":[{"id":"CVE-2024-57868","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.\n\nSpecifically Web::API uses the Data::Random library which specifically states that it is \"Useful mostly for test programs\". Data::Random uses the rand() function.","status":"published","published":"2025-04-05T16:15:33.18Z","modified":"2026-06-17T08:14:06.99Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium","assessor":"secondary"}],"cwes":["CWE-331","CWE-338"],"updated_at":"2026-11-02T14:10:46.40251Z"}],"osv":[{"id":"CVE-2024-57868","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.\n\nSpecifically Web::API uses the Data::Random library which specifically states that it is \"Useful mostly for test programs\". Data::Random uses the rand() function.","status":"published","published":"2025-04-05T16:15:33.18Z","modified":"2026-03-15T22:48:52.089011Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T15:44:45.107804Z"},{"id":"DEBIAN-CVE-2024-57868","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.","status":"published","published":"2025-04-05T16:15:33.18Z","modified":"2026-11-02T12:03:11.491555681Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T15:45:44.429177Z"},{"id":"UBUNTU-CVE-2024-57868","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.","status":"published","published":"2025-04-05T16:15:00Z","modified":"2026-10-17T12:57:00.038949988Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T16:55:15.331356Z"}]}}
