Plack Middleware Session Insecure Session ID Generation Vulnerability

Vulnerability

A vulnerability exists in Plack-Middleware-Session versions prior to 0.35 for Perl, where session IDs are generated insecurely. The default generator creates a SHA-1 hash that is seeded with the built-in rand function, the epoch time, and the process ID (PID). This method is flawed because the PID is drawn from a limited range of values, the epoch time can be predicted unless it is disclosed in the HTTP Date header, and the rand function is not suitable for cryptographic purposes. The predictability of session IDs could potentially allow an attacker to gain unauthorized access to systems.

Impact

The vulnerability leads to the generation of predictable session IDs, which could be exploited to hijack user sessions and gain unauthorized access to systems.

Reproduction

The vulnerability can be reproduced by using Plack-Middleware-Session versions prior to 0.35 and enabling the session middleware. The default session ID generator will create predictable IDs based on low-entropy data, which can be exploited to guess session IDs and potentially access user sessions.

Remediation

Users can upgrade to Plack-Middleware-Session version 0.35 or later, where this vulnerability has been addressed. Instructions for upgrading can be found on the module's CPAN page.

Added: Sep 1, 2025, 7:22 PM
Updated: Sep 1, 2025, 7:22 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.0
exploitability
8.4
remediation
0.0
relevance
0.3
threat
4.8
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.