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.

Published: 2026-03-05 Last update: 2026-04-12 Assigner: 9b29abf9-4ab0-4765-b253-1875cd9b441e Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Conclusion & alert: CVE-2025-40931 is rated Low Risk (39.1/100): CVSS Critical severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-40931

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-21 0.07% 0.03% -0.04%
2 2026-04-13 0.02% 0.07% +0.05%
3 2026-03-05 0.02%

Full EPSS history (3 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-40931

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.1 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 5.2 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2025-40931

OS Trackers for CVE-2025-40931

vendor priority summary link
debian not yet assigned CVE-2025-40931 not yet assigned priority: Debian including 1 source packages (libapache-session-perl), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): open 5. https://security-tracker.debian.org/tracker/CVE-2025-40931
ubuntu medium CVE-2025-40931 medium priority: Ubuntu including 1 source packages (libapache-session-perl), 8 status rows across 8 suites (bionic, focal, jammy, noble, questing, resolute, upstream, xenial): needs-triage 8. https://ubuntu.com/security/CVE-2025-40931

Affected software / configurations for CVE-2025-40931

Vendor Product Version Raw CPE
chorny apache::session::generate::md5 <= 1.94 cpe:2.3:a:chorny:apache\:\:session\:\:generate\:\:md5:*:*:*:*:*:perl:*:*

References for CVE-2025-40931

URL Tags
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930659
https://github.com/chorny/Apache-Session/issues/4 Issue Tracking
https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633
https://metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm#L27 Product
https://metacpan.org/pod/Apache::Session::Generate::Random
https://rt.cpan.org/Ticket/Display.html?id=173631 Third Party Advisory
https://salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bdabd71c2f91b18526e31a9dc52b4c17b3d246b7#898a4b8b00022df1b8689910b67707f3e738d180
https://security.metacpan.org/docs/guides/random-data-for-security.html Mailing List Third Party Advisory
https://www.openwall.com/lists/oss-security/2019/06/15/1
http://www.openwall.com/lists/oss-security/2026/03/05/3 Mailing List Third Party Advisory
cvelogic Threat Intelligence