CVE-2025-40931: Libapache session perl · Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure
Affects libapache-session-perlSource GCVE Database
Not known to be exploited · CVSS 9.1 Critical.
Data as of 28 Oct 2026, 22:28 UTC
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 5 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10libapache-session-perlpkg:deb/ubuntu/libapache-session-perl?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSlibapache-session-perlpkg:deb/ubuntu/libapache-session-perl?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 25.10libapache-session-perlpkg:deb/ubuntu/libapache-session-perl?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlibapache-session-perlpkg:deb/ubuntu/libapache-session-perl?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSlibapache-session-perlpkg:deb/ubuntu/libapache-session-perl?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTSlibapache-session-perlpkg:deb/ubuntu/libapache-session-perl?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2025-40931 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-40931 (opens in a new tab)
- lists.security.metacpan.org/cve-announce/msg/37639294/ (opens in a new tab)
- metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm (opens in a new tab)
- security.metacpan.org/docs/guides/random-data-for-security.html (opens in a new tab)