CVE-2025-40931
Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
9.1
Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id
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.
- Record
CVE-2025-40931- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-340, CWE-338
- Updated
- 2026-11-02
EUVDEUVD-2025-208297
9.1
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.
- Record
EUVD-2025-208297- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-32fg-c88m-mcrv
9.1
Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id. Apache...
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.
- Record
GHSA-32fg-c88m-mcrv- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-338
- Updated
- 2026-11-02
NVD
9.1
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.
- Record
CVE-2025-40931- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-338, CWE-340
- Updated
- 2026-11-02
OSV
9.1
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.
- Record
CVE-2025-40931- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-40931
9.1
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.
- Record
DEBIAN-CVE-2025-40931- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-40931
9.1
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.
- Record
UBUNTU-CVE-2025-40931- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libapache-session-perlDebian:12 |
All versions, plus listed versions 1.94-2 |
None known |
libapache-session-perlDebian:13 |
All versions, plus listed versions 1.94-2 |
None known |
libapache-session-perlDebian:14 |
All versions, plus listed versions 1.94-2 |
None known |
libapache-session-perlUbuntu:16.04:LTS |
All versions, plus listed versions 1.93-21.93-2ubuntu1 |
None known |
libapache-session-perlUbuntu:18.04:LTS |
All versions, plus listed versions 1.93-2ubuntu1 |
None known |
libapache-session-perlUbuntu:20.04:LTS |
All versions, plus listed versions 1.93-3 |
None known |
libapache-session-perlUbuntu:22.04:LTS |
All versions, plus listed versions 1.94-1 |
None known |
libapache-session-perlUbuntu:24.04:LTS |
All versions, plus listed versions 1.94-2 |
None known |
libapache-session-perlUbuntu:25.10 |
All versions, plus listed versions 1.94-2 |
None known |
libapache-session-perlUbuntu:26.10 |
All versions, plus listed versions 1.94-2 |
None known |
libapache-session-perlUbuntu:26.04:LTS |
All versions, plus listed versions 1.94-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-40931 is a critical vulnerability (CVSS 9.1) in Chorny Apache::session::generate::md5, published March 5, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.64%, the 51st percentile. No source names a fixed version.
References
metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm
security.metacpan.org/docs/guides/random-data-for-security.html
github.com/chorny/Apache-Session/issues/4
rt.cpan.org/Ticket/Display.html?id=173631
openwall.com/lists/oss-security/2019/06/15/1
bugs.debian.org/cgi-bin/bugreport.cgi?bug=930659
Show 10 moreShow less
salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bdabd71c2f91b18526e31a9dc52b4c17b3d246b7
gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633
metacpan.org/pod/Apache::Session::Generate::Random
openwall.com/lists/oss-security/2026/03/05/3
nvd.nist.gov/vuln/detail/CVE-2025-40931
github.com/advisories/GHSA-32fg-c88m-mcrv
security-tracker.debian.org/tracker/CVE-2025-40931
ubuntu.com/security/CVE-2025-40931
cve.org/CVERecord?id=CVE-2025-40931
lists.security.metacpan.org/cve-announce/msg/37639294