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
Share

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
qualitative
Red Hat
7.4 HIGH
qualitative

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

3
Analysis Generated
Jul 22, 2026 - 18:46 vuln.today
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.

AnalysisAI

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.

Technical ContextAI

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.

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.

Vendor StatusVendor

SUSE

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

Share

CVE-2026-56016 vulnerability details – vuln.today

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