Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObserve HTTP Date header to approximate session creation timestamp
-
DeliveryEnumerate likely PID range for spawned CGI process
-
ExploitCompute candidate Perl rand() states
-
ExecutionGenerate MD5 candidate session IDs offline
-
PersistSubmit forged session cookie in HTTP request
-
ImpactBypass 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
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.
Primary rating from Vendor (CPANSec).
CVSS VectorVendor: CPANSec
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
irc.cgi in CGI:IRC before 0.5.12 reflects user-supplied input from the R parameter without proper output encoding, aka X
In the CGI gem before 0.4.2 for Ruby, the CGI::Cookie.parse method in the CGI library contains a potential Denial of Ser
Stack-based buffer overflow in Logica HotScan allows remote attackers to cause a denial of service (crash) via a crafted
In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#es
Same technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Package Hub 15 SP7 | Fixed |
| openSUSE Tumbleweed | Fixed |
| SUSE Package Hub 15 SP7 | Affected |
EUVD-2026-40927
GHSA-r49c-4q8x-x33v
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB