CVE-2025-40926 Details
Description
Plack::Middleware::Session::Simple versions before 0.05 for Perl generates session ids insecurely. The default session id generator returns a SHA-1 hash seeded with the built-in rand function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predictable session ids could allow an attacker to gain access to systems. Plack::Middleware::Session::Simple is intended to be compatible with Plack::Middleware::Session, which had a similar security issue CVE-2025-40923.
A vulnerability exists in Plack::Middleware::Session::Simple versions through 0.04 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, and the epoch time can be predicted unless it is disclosed in the HTTP Date header. The use of the rand function further compromises security, as it is not suitable for cryptographic purposes. This predictability in session IDs could potentially allow an attacker to gain unauthorized access to systems. This middleware aims to be compatible with Plack::Middleware::Session, which has a related security vulnerability (CVE-2025-40923).
Users can upgrade to Plack::Middleware::Session::Simple version 0.35 or later, where this vulnerability has been addressed by using Crypt::SysRandom to generate session IDs securely.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/kazeburo/Plack-Middleware-Session-Simple/commit/760bb358b8f53e52cf415888a4ac858fd99bb24e.patch | CPANSec | Patch |
| https://github.com/kazeburo/Plack-Middleware-Session-Simple/pull/4 | CPANSec | Issue TrackingPatch |
| https://metacpan.org/release/KAZEBURO/Plack-Middleware-Session-Simple-0.04/source/lib/Plack/Middleware/Session/Simple.pm#L43 | CPANSec | Issue TrackingProduct |
| https://metacpan.org/release/KAZEBURO/Plack-Middleware-Session-Simple-0.05/changes | CPANSec | |
| https://security.metacpan.org/docs/guides/random-data-for-security.html | CPANSec | Third Party Advisory |
| https://www.cve.org/CVERecord?id=CVE-2025-40923 | CPANSec | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | CPANSec |
| CWE-340 | Generation of Predictable Numbers or Identifiers | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| kazeburo plack::middleware::session::simple | < 0.05 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 12, 2026 | CVE Modified | CPANSec |
| Mar 9, 2026 | Initial Analysis | [email protected] |
| Mar 5, 2026 | CVE Modified | CISA-ADP |
| Mar 5, 2026 | New CVE Received | CPANSec |