CVE-2026-56016 PUBLISHED

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

Assigner: CPANSec
Reserved: 18.06.2026 Published: 01.07.2026 Updated: 01.07.2026

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.

Product Status

Vendor MARKSTOS
Product CGI::Session::ID::md5
Versions Default: unaffected
  • affected from 0 to 4.49 (excl.)

Solutions

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

References

Problem Types

  • CWE-340 Generation of Predictable Numbers or Identifiers CWE
  • CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator CWE

Impacts

  • CAPEC-59 Session Credential Falsification through Prediction
  • CAPEC-115 Authentication Bypass