CVE-2026-56016

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

Published Jul 1, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
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.

Remediation

Vendor Solution

Upgrade to CGI::Session 4.49 or later, which generates session ids from Crypt::SysRandom.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Markstos
Markstos cgi::session::id::md5
Vendors & Products Markstos
Markstos cgi::session::id::md5
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title CGI::Session::ID::md5 versions before 4.49 for Perl generate predictable session ids from low-entropy sources
Weaknesses CWE-338
CWE-340
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Jul 1, 2026, 5:36 PM
Reserved
Jun 18, 2026, 11:27 AM
Status
Deferred
Published
Jul 1, 2026, 8:16 AM
Modified
Oct 25, 2026, 5:10 PM
Severity
Important
Public date
Jul 1, 2026, 6:46 AM