Vulnerability in Chorny Apache::session::generate::md5
CVE-2025-40931
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.1 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
EPSS exploit prediction
EPSS 0.006, 51.5th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
Weakness classification (CWE)
References
- metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm (Product)
- security.metacpan.org/docs/guides/random-data-for-security.html (technical-description, Mailing List, Third Party Advisory)
- github.com/chorny/Apache-Session/issues/4 (issue-tracking, Issue Tracking)
- rt.cpan.org/Ticket/Display.html (issue-tracking, Third Party Advisory)
- www.openwall.com/lists/oss-security/2019/06/15/1 (mailing-list)
- bugs.debian.org/cgi-bin/bugreport.cgi (issue-tracking)
- salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bda… (patch)
- gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633 (issue-tracking)
- metacpan.org/pod/Apache::Session::Generate::Random
- www.openwall.com/lists/oss-security/2026/03/05/3 (Mailing List, Third Party Advisory)