{"id":"CVE-2025-40931","aliases":["DEBIAN-CVE-2025-40931","EUVD-2025-208297","GHSA-32fg-c88m-mcrv","UBUNTU-CVE-2025-40931"],"status":"published","title":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.\n\nNote that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-09","score":0.00643,"percentile":0.51145,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-338","CWE-340"],"published":"2026-03-05T01:41:09Z","modified":"2026-10-28T20:15:51Z","affected":[{"source":"osv","ecosystem":"Debian:12","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]},{"source":"osv","ecosystem":"Debian:13","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]},{"source":"osv","ecosystem":"Debian:14","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.93-2","1.93-2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.93-2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.93-3"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libapache-session-perl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.94-2"]}],"products":[{"vendor":"chorny","product":"apache::session::generate::md5"},{"vendor":"chorny","product":"apache\\"}],"references":[{"url":"https://metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm#L27","tags":["Product","web","report"]},{"url":"https://security.metacpan.org/docs/guides/random-data-for-security.html","tags":["technical-description","Mailing List","Third Party Advisory","advisory","report"]},{"url":"https://github.com/chorny/Apache-Session/issues/4","tags":["issue-tracking","Issue Tracking","report"]},{"url":"https://rt.cpan.org/Ticket/Display.html?id=173631","tags":["issue-tracking","Third Party Advisory","advisory"]},{"url":"https://www.openwall.com/lists/oss-security/2019/06/15/1","tags":["mailing-list"]},{"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930659","tags":["issue-tracking"]},{"url":"https://salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bdabd71c2f91b18526e31a9dc52b4c17b3d246b7#898a4b8b00022df1b8689910b67707f3e738d180","tags":["patch"]},{"url":"https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633","tags":["issue-tracking"]},{"url":"https://metacpan.org/pod/Apache::Session::Generate::Random"},{"url":"http://www.openwall.com/lists/oss-security/2026/03/05/3","tags":["Mailing List","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40931"},{"url":"https://github.com/advisories/GHSA-32fg-c88m-mcrv"},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-40931","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-40931","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-40931","tags":["report"]},{"url":"https://lists.security.metacpan.org/cve-announce/msg/37639294/","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2025-40931","title":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.\n\nNote that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.","status":"published","published":"2026-03-05T01:41:09.588Z","modified":"2026-04-21T02:42:43.047Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"adp"}],"cwes":["CWE-340","CWE-338"],"updated_at":"2026-11-02T14:32:34.434755Z"}],"euvd":[{"id":"EUVD-2025-208297","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.\n\nNote that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.","status":"published","published":"2026-03-05T01:41:09Z","modified":"2026-04-21T02:42:43Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T19:24:22.012341Z"}],"ghsa":[{"id":"GHSA-32fg-c88m-mcrv","title":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache...","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.","status":"published","published":"2026-03-05T03:31:26Z","modified":"2026-04-12T18:31:30Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-338"],"updated_at":"2026-11-02T15:07:25.53537Z"}],"nvd":[{"id":"CVE-2025-40931","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.\n\nNote that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.","status":"published","published":"2026-03-05T02:16:39.96Z","modified":"2026-06-17T09:22:19.07Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"secondary"}],"cwes":["CWE-338","CWE-340"],"updated_at":"2026-11-02T14:12:01.096037Z"}],"osv":[{"id":"CVE-2025-40931","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.","status":"published","published":"2026-03-05T02:16:39.96Z","modified":"2026-03-14T12:42:39.968411Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T15:44:49.394967Z"},{"id":"DEBIAN-CVE-2025-40931","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.  Apache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.  Note that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.","status":"published","published":"2026-03-05T02:16:39.96Z","modified":"2026-09-01T20:05:52.284447054Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T15:45:46.998514Z"},{"id":"UBUNTU-CVE-2025-40931","description":"Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id. Apache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems. Note that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.","status":"published","published":"2026-03-05T02:16:00Z","modified":"2026-10-28T20:15:51.084791875Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T16:55:46.53147Z"}]}}
