CVE-2026-5087
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.
Weakness
- CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
- CWE-1204: Generation of Weak Initialization Vector (IV)
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | yes |
| Technical impact | partial |
| Scored | 2026-04-01 |
Timeline
- 2026-03-31Published by the CNA16:03 UTC
- 2026-04-01CISA SSVC decision recorded1 day after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| jjnapiork pagi::middleware::session::store::cookie | through 0.001003no fix listed | not listed |
References
- http://www.openwall.com/lists/oss-security/2026/03/31/10
- https://metacpan.org/release/JJNAPIORK/PAGI-Middleware-Session-Store-Cookie-0.001003/source/lib/PAGI/Middleware/Session/Store/Cookie.pm#L156-173
- https://metacpan.org/release/JJNAPIORK/PAGI-Middleware-Session-Store-Cookie-0.001004/changes
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-5087'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-5087'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-5087'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-5087'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).