CPANSA-CGI-Session-2026-56016: CGI-Session vulnerability

Publisher giterlizzi Document category csaf_security_advisory
Initial release date 2026-07-01T00:00:00 Engine CSAF Perl Toolkit 0.26
Current release date 2026-07-01T00:00:00 Build Date
Current version 1 Status final
CVSS v3.1 Base Score 5.9 Severity
Original language Language en
Also referred to

Vulnerability 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.

Vulnerabilities

CVE-2026-56016

Vulnerability 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.

Weakness CWE-338 : Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Product status

Known affected
Product Score
CGI-Session less than 4.49
CVSS Version CVSS Vector CVSS Base Score CVSS Base Severity
3.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N 5.9 Medium
Fixed

giterlizzi

Namespace: https://github.com/giterlizzi/

gdt@cpan.org

References

Revision history

Version Date of the revision Summary of the revision
1 Wed Jul 1 00:00:00 2026 First release

Sharing rules

TLP:WHITE
For the TLP version see: https://www.first.org/tlp/