Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id

Summary

CVECVE-2025-40931
StatePUBLISHED
AssignerCPANSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-03-05 02:16:39 UTC
Updated2026-04-12 18:16:38 UTC
DescriptionApache::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.

Risk And Classification

Primary CVSS: v3.1 9.1 CRITICAL from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Problem Types: CWE-338 | CWE-340 | CWE-340 CWE-340 Generation of Predictable Numbers or Identifiers | CWE-338 CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary9.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Chorny Apache \ session\ \ generate\

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA CHORNY ApacheSessionGenerateMD5 affected 1.94 custom Not specified

References

ReferenceSourceLinkTags
salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bd... 9b29abf9-4ab0-4765-b253-1875cd9b441e salsa.debian.org
gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633 9b29abf9-4ab0-4765-b253-1875cd9b441e gitlab.ow2.org
metacpan.org/pod/Apache::Session::Generate::Random 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
www.openwall.com/lists/oss-security/2019/06/15/1 9b29abf9-4ab0-4765-b253-1875cd9b441e www.openwall.com
github.com/chorny/Apache-Session/issues/4 9b29abf9-4ab0-4765-b253-1875cd9b441e github.com Issue Tracking
security.metacpan.org/docs/guides/random-data-for-security.html 9b29abf9-4ab0-4765-b253-1875cd9b441e security.metacpan.org Mailing List, Third Party Advisory
metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org Product
www.openwall.com/lists/oss-security/2026/03/05/3 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com Mailing List, Third Party Advisory
bugs.debian.org/cgi-bin/bugreport.cgi 9b29abf9-4ab0-4765-b253-1875cd9b441e bugs.debian.org
rt.cpan.org/Ticket/Display.html 9b29abf9-4ab0-4765-b253-1875cd9b441e rt.cpan.org Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

SourceTimeEvent
CNA2017-10-06T00:00:00.000ZIssue created in the GitHub repository for Apache-Session identifying poor entropy.
CNA2019-06-15T00:00:00.000ZReport posted to the Open Source Security mailing list.
CNA2019-06-17T00:00:00.000ZDebian bug 930659 for libapache-session-perl poor source of entropy for session id generation.
CNA2019-06-20T00:00:00.000ZPatch to use Crypt::URandom created by the Debian Perl Group.
CNA2025-09-04T00:00:00.000ZIssue reported to CPANSec.
CNA2026-03-05T00:00:00.000ZCVE disclosed by CPANSec.

Solutions

CNA: Consider alternate solutions like https://metacpan.org/pod/Apache::Session::Generate::Random

Workarounds

CNA: Apply the patch from the Debian Perl Group that uses Crypt::URandom.

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report