Skip to main content

CGI::Session::ID::md5 CVE-2026-56016

| EUVDEUVD-2026-40927 MEDIUM
Generation of Predictable Numbers or Identifiers (CWE-340)
2026-07-01 CPANSec GHSA-r49c-4q8x-x33v
5.9
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Observe HTTP Date header to approximate session creation timestamp
  2. Delivery
    Enumerate likely PID range for spawned CGI process
  3. Exploit
    Compute candidate Perl rand() states
  4. Execution
    Generate MD5 candidate session IDs offline
  5. Persist
    Submit forged session cookie in HTTP request
  6. Impact
    Bypass authentication as impersonated user

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

The target application must use CGI::Session with the md5 session ID driver (CGI::Session::ID::md5) on any version prior to 4.49 - this is the sole configuration prerequisite. No attacker authentication is required (CVSS PR:N). Exploitation is constrained by the need to approximate server-side PID and epoch time at the moment a target session was created; the HTTP Date header partially leaks the timestamp, narrowing the search space, but Perl's rand() state is not directly observable remotely, which raises enumeration cost and justifies the CVSS AC:H rating. Short session lifetimes further limit the window in which a predicted token is valid. No non-default configuration is required beyond the application's use of the md5 ID driver, which is the default driver in affected CGI-Session versions.

Impact

CVSS 5.9 (Medium) with AC:H is an accurate characterization: the attacker must correctly combine approximate PID, timestamp, and rand() state to forge a valid session token, which is technically feasible but not trivial or automatable. EPSS at 0.19% (8th percentile) and SSVC Automatable: no both reinforce that this is a targeted, high-effort attack rather than a spray-and-pray vulnerability. The absence of a KEV listing and SSVC Exploitation: none confirm no observed active exploitation at time of analysis. The C:H impact is genuine - a successful session prediction yields full access to the hijacked session's stored data and authenticated context. SSVC Technical Impact: partial aligns with the contained scope (S:U) - no privilege escalation beyond the impersonated session is implied. Overall, this is a real but low-urgency finding most relevant to legacy Perl CGI applications where session security is a trust boundary; the high attack complexity meaningfully limits realistic attacker automation.

Exploit ScenarioDerived

An attacker targeting a known Perl CGI application records HTTP Date response headers to approximate the server's epoch time at session creation, then enumerates the constrained PID range typical of a freshly spawned CGI process. By computing MD5 over the cross-product of (candidate PIDs, timestamp window, predicted rand() states), the attacker generates a set of candidate session IDs and submits each as a cookie until one matches an active authenticated session, gaining unauthorized access. No public exploit code has been identified at time of analysis, but the attack requires only standard HTTP tooling and offline computation.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 22, 2026

Session identifier generation in CGI::Session::ID::md5 versions prior to 4.49 for Perl is cryptographically weak, enabling remote attackers with sufficient effort to predict valid session tokens and impersonate authenticated users. The generate_id method combines three deterministic or low-entropy sources - process ID, Unix epoch timestamp, and Perl's non-cryptographic rand() - before hashing with MD5, leaving the session ID space practically enumerable given approximate knowledge of server state. No public exploit has been identified at time of analysis; SSVC assigns Exploitation: none and EPSS places this at the 8th percentile, indicating low real-world exploitation probability despite the C:H confidentiality impact.

RemediationAI

Upgrade to CGI-Session 4.49 or later, which replaces the predictable generate_id implementation in the md5 driver with a cryptographically appropriate source. The patched source is available at https://metacpan.org/release/MARKSTOS/CGI-Session-4.49/source/lib/CGI/Session/ID/md5.pm and the changelog at https://metacpan.org/release/MARKSTOS/CGI-Session-4.49/changes. If immediate upgrade is not feasible, consider switching to an alternative CGI::Session ID driver that draws entropy from /dev/urandom or the OS CSPRNG rather than PID and rand(). As a compensating control, enforcing aggressive session lifetimes (short idle and absolute timeouts) reduces the window during which a predicted session ID remains valid, at the cost of increased re-authentication friction for end users. Suppressing or randomizing the HTTP Date response header removes one observable input that helps narrow the attacker's timestamp search space, though this is a minor hardening measure rather than a fix.

Affected VersionsENISA

CGI::Session::ID::md5 0 <4.49

Affected Packages

euvd cgi_session_id_md5 fix: 4.49

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CGI::Session is a Perl CPAN distribution (maintained by MARKSTOS, CPE cpe:2.3:a:markstos:cgi::session::id::md5) providing session management for CGI-based web applications. The affected component, CGI::Session::ID::md5, implements the session ID generation driver using MD5 (Message Digest 5). CWE-340 (Generation of Predictable Numbers or Identifiers) is the root cause: generate_id seeds MD5 with the OS process ID (a small integer drawn from a constrained kernel range), the Unix epoch timestamp (partially observable via the HTTP Date response header), and Perl's built-in rand(), which is a linear congruential generator that is neither cryptographically secure nor suitable for producing unpredictable identifiers. MD5 provides no entropy amplification - it merely obfuscates deterministic inputs - so the effective session ID space is far smaller than the 128-bit hash output implies. The fix in version 4.49 replaces this scheme with a cryptographically appropriate entropy source.

Know when Cgi gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

Network-based session prediction requires high complexity; no privileges needed; impact is confidentiality only via session exposure, with no integrity or availability consequence at the module level.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 7.4 HIGH

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

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

Lifecycle Timeline

2
Patch available
Jul 01, 2026 - 09:01 EUVD
CVE Published
Jul 01, 2026 - 06:46 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

CGI::Session::ID::md5 versions before 4.49 for Perl generate predictable session ids from low-entropy sources.

The generate_id method builds the session id from a MD5 digest of the process id, the epoch time, and the built-in rand() function. All three are predictable, low-entropy sources: the PID is drawn from a small range, the epoch time can be guessed or read from the HTTP Date header, and Perl's rand() is unsuitable for security purposes because it is predictable and reversible.

An attacker who predicts a session id can impersonate the corresponding session and bypass authentication.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Low
legacy Perl CGI session module, niche modern deployment footprint
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Package Hub 15 SP7 Fixed
openSUSE Tumbleweed Fixed
SUSE Package Hub 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy