Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.0%top 91%

CVE-2025-40931: CWE-340 Generation of Predictable Numbers or Identifiers in CHORNY Apache::Session::Generate::MD5

0
Critical
VulnerabilityCVE-2025-40931cvecve-2025-40931cwe-340cwe-338
Published: Thu Mar 05 2026 (03/05/2026, 01:41:09 UTC)
Source: CVE Database V5
Vendor/Project: CHORNY
Product: Apache::Session::Generate::MD5

Description

CVE-2025-40931 affects Apache::Session::Generate::MD5 for Perl, which generates session IDs using an insecure method. The session IDs are created by hashing a combination of the built-in rand() function, epoch time, and process ID (PID) with MD5. Because rand() is not cryptographically secure, and the PID and epoch time can be guessed or inferred, the session IDs are predictable. This predictability could allow attackers to hijack sessions and gain unauthorized access. Some Debian-based distributions have patched this by replacing the generator with Crypt::URandom. No official patch or vendor advisory is provided for the original module. The vulnerability has a CVSS score of 9. 1, indicating critical severity.

CVSS v3.1

Score 9.1critical

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

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/28/2026, 06:09:43 UTC

Technical Analysis

Apache::Session::Generate::MD5 versions through 1.94 generate session IDs insecurely by using MD5 hashes seeded with the built-in rand() function, epoch time, and PID. The rand() function is unsuitable for cryptographic purposes, and the PID and epoch time values are predictable or guessable, leading to predictable session identifiers. This vulnerability (CVE-2025-40931) can allow attackers to predict session IDs and potentially gain unauthorized access to systems relying on these sessions. Some Debian-based Linux distributions have mitigated this issue by patching the libapache-session-perl package to use Crypt::URandom instead of the insecure generator. No official patch or vendor advisory is currently available for the original Apache::Session::Generate::MD5 module.

Potential Impact

The vulnerability allows attackers to predict session IDs due to weak randomness in the generation process. This can lead to session hijacking and unauthorized access to systems using the affected Apache::Session::Generate::MD5 module. The CVSS score of 9.1 reflects high confidentiality and integrity impact with no availability impact. There are no known exploits in the wild at this time.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. As a mitigation, users of Debian-based distributions should verify if their libapache-session-perl package has been patched to use Crypt::URandom instead of the vulnerable MD5 generator. Until an official fix is available, consider replacing Apache::Session::Generate::MD5 with a cryptographically secure session ID generator.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
CPANSec
Date Reserved
2025-04-16T09:05:34.363Z
Cvss Version
null
State
PUBLISHED

Threat ID: 69a8e7f5d1a09e29cba26c30

Added to database: 3/5/2026, 2:18:29 AM

Last enriched: 4/28/2026, 6:09:43 AM

Last updated: 5/31/2026, 6:45:25 AM

Views: 194

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses