Security Advisories (2)
CPANSA-CGI-Session-2006-01 (2006-04-06)

possible SQL injection attack

CVE-2026-56016 (2026-07-01)

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.

Changes for version 4.10

  • SECURITY: Hopefully this settles all of the problems with symlinks. Both the file and db_file drivers now use O_NOFOLLOW with open when the file should exist and O_EXCL|O_CREAT when creating the file. Tests added for symlinks. (Matt LeBlanc)
  • SECURITY: sqlite driver no longer attempts to use /tmp/sessions.sqlt when no Handle or DataSource is specified. This was a mistake from a security standpoint as anyone on the machine would then be able to create and therefore insert data into your sessions. (Matt LeBlanc)
  • NEW: name is now an instance method (RT#17979) (Matt LeBlanc)

Modules

persistent session data in CGI applications
CGI::Session driver specifications
Base class for native DBI-related CGI::Session drivers
CGI::Session driver for BerkeleyDB using DB_File
Default CGI::Session driver
CGI::Session driver for MySQL database
PostgreSQL driver for CGI::Session
CGI::Session driver for SQLite
error handling routines for CGI::Session
CGI::Session ID driver
default CGI::Session ID generator
CGI::Session ID Driver for generating static IDs
Default CGI::Session serializer
serializer for CGI::Session
serializer for CGI::Session
Serializer for CGI::Session
serializer for CGI::Session
Extended CGI::Session manual

Provides

in lib/CGI/Session/Test/Default.pm
in lib/CGI/Session/Test/Default.pm
in lib/CGI/Session/Test/Default.pm