CVE-2026-5087 Details
Description
PAGI::Middleware::Session::Store::Cookie versions through 0.001003 for Perl generates random bytes insecurely. PAGI::Middleware::Session::Store::Cookie attempts to read bytes from the /dev/urandom device directly. If that fails (for example, on systems without the device, such as Windows), then it will emit a warning that recommends the user install Crypt::URandom, and then return a string of random bytes generated by the built-in rand function, which is unsuitable for cryptographic applications. This modules does not use the Crypt::URandom module, and installing it will not fix the problem. The random bytes are used for generating an initialisation vector (IV) to encrypt the cookie. A predictable IV may make it easier for malicious users to decrypt and tamper with the session data that is stored in the cookie.
A vulnerability exists in PAGI::Middleware::Session::Store::Cookie versions through 0.001003 for Perl, where random bytes are generated insecurely for use in encryption. The module attempts to read bytes from /dev/urandom for cryptographic purposes. However, on systems without this device, such as Windows, it falls back to using the built-in rand function, which is not cryptographically secure. This insecure random byte generation is used to create an initialization vector (IV) for encrypting session data stored in cookies. A predictable IV could potentially allow attackers to decrypt or tamper with the session data.
Users can upgrade to PAGI::Middleware::Session::Store::Cookie version 0.001004 or later, which addresses the vulnerability by using Crypt::PRNG from CryptX for secure random byte generation.
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 Apr 1, 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://metacpan.org/release/JJNAPIORK/PAGI-Middleware-Session-Store-Cookie-0.001003/source/lib/PAGI/Middleware/Session/Store/Cookie.pm#L156-173 | CPANSec | Broken Link |
| https://metacpan.org/release/JJNAPIORK/PAGI-Middleware-Session-Store-Cookie-0.001004/changes | CPANSec | Release Notes |
| http://www.openwall.com/lists/oss-security/2026/03/31/10 | CVE | Mailing ListThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1204 | Generation of Weak Initialization Vector (IV) | CPANSec |
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| jjnapiork pagi::middleware::session::store::cookie | <= 0.001003 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 3, 2026 | Initial Analysis | [email protected] |
| Apr 1, 2026 | CVE Modified | CISA-ADP |
| Mar 31, 2026 | CVE Modified | CVE |
| Mar 31, 2026 | New CVE Received | CPANSec |