The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-5087

CVE-2026-5087: PAGI Perl Session Cookie Vulnerability

CVE-2026-5087 is an information disclosure vulnerability in PAGI::Middleware::Session::Store::Cookie for Perl that generates random bytes insecurely. This weakness enables attackers to decrypt session cookies. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: April 2, 2026

CVE-2026-5087 Overview

CVE-2026-5087 is an insecure random number generation vulnerability affecting PAGI::Middleware::Session::Store::Cookie versions through 0.001003 for Perl. The module generates random bytes insecurely by falling back to the built-in rand function when /dev/urandom is unavailable, which is unsuitable for cryptographic applications.

The module attempts to read bytes from the /dev/urandom device directly. If that fails (for example, on systems without the device, such as Windows), it emits a warning recommending the user install Crypt::URandom, then returns a string of random bytes generated by the built-in rand function. Critically, the module does not actually use the Crypt::URandom module, and installing it will not fix the problem. The random bytes are used for generating an initialization vector (IV) to encrypt the cookie, meaning a predictable IV may make it easier for malicious users to decrypt and tamper with session data stored in the cookie.

Critical Impact

Predictable initialization vectors enable attackers to potentially decrypt and tamper with session cookies, leading to session hijacking and unauthorized access to user accounts.

Affected Products

  • PAGI::Middleware::Session::Store::Cookie versions through 0.001003
  • Perl applications using the vulnerable module on Windows or systems without /dev/urandom
  • Web applications relying on the Cookie module for session management

Discovery Timeline

  • 2026-03-31 - CVE-2026-5087 published to NVD
  • 2026-04-01 - Last updated in NVD database

Technical Details for CVE-2026-5087

Vulnerability Analysis

This vulnerability stems from improper cryptographic random number generation (CWE-338). The PAGI::Middleware::Session::Store::Cookie module is responsible for encrypting session data stored in cookies. A critical component of this encryption is the initialization vector (IV), which must be unpredictable to ensure the confidentiality and integrity of the encrypted data.

The module's fallback mechanism to Perl's built-in rand function when /dev/urandom is unavailable creates a significant security weakness. The rand function is a pseudorandom number generator (PRNG) that is not cryptographically secure—its output is predictable given sufficient observations or knowledge of the seed value.

Root Cause

The root cause is a flawed fallback mechanism in the random byte generation logic. When the module cannot access /dev/urandom, it falls back to using Perl's rand function for generating the IV. This function uses a linear congruential generator or similar algorithm that is designed for statistical randomness, not cryptographic security. Additionally, the misleading warning message suggests installing Crypt::URandom, but the module never actually uses that library even if installed.

Attack Vector

The attack vector is network-based and requires no privileges or user interaction. An attacker can exploit this vulnerability against applications running on Windows systems or other environments lacking /dev/urandom. By observing encrypted session cookies and leveraging the predictable nature of the rand-generated IVs, an attacker may be able to:

  1. Predict future IVs based on observed patterns
  2. Perform cryptanalysis to decrypt session data
  3. Forge or tamper with session cookies to hijack user sessions
  4. Escalate privileges by modifying session attributes

The vulnerability mechanism involves the module's IV generation function falling back to insecure randomness. For technical implementation details, see the MetaCPAN Cookie Store Code reference.

Detection Methods for CVE-2026-5087

Indicators of Compromise

  • Warning messages in application logs indicating "install Crypt::URandom" recommendations
  • Session cookie anomalies or unexpected session hijacking incidents
  • Applications running on Windows systems using the vulnerable module version
  • Evidence of session tampering or unauthorized privilege changes

Detection Strategies

  • Audit Perl application dependencies for PAGI::Middleware::Session::Store::Cookie versions 0.001003 or earlier
  • Monitor application logs for warnings related to random byte generation failures
  • Implement session validation mechanisms to detect potentially tampered cookies
  • Review deployment environments for systems lacking /dev/urandom access

Monitoring Recommendations

  • Configure alerting for session-related security events and authentication anomalies
  • Monitor for unusual session cookie patterns or rapid session changes
  • Track application warnings related to cryptographic operations
  • Implement behavioral analysis to detect session hijacking attempts

How to Mitigate CVE-2026-5087

Immediate Actions Required

  • Upgrade PAGI::Middleware::Session::Store::Cookie to version 0.001004 or later
  • Audit all Perl applications for use of the vulnerable module
  • Ensure production systems have access to /dev/urandom where possible
  • Consider regenerating session keys and invalidating existing sessions after patching

Patch Information

The vulnerability has been addressed in version 0.001004 of the module. The changelog documenting the fix is available at the MetaCPAN Cookie Store Changes page. Organizations should update to this version immediately, particularly for applications running on Windows or systems without access to /dev/urandom.

Additional discussion of this vulnerability can be found on the OpenWall OSS-Security mailing list.

Workarounds

  • Ensure the application server has access to /dev/urandom by deploying on Linux/Unix systems
  • Implement additional server-side session validation to detect tampered cookies
  • Consider using alternative session storage mechanisms that do not rely on the vulnerable module
  • Add application-level integrity checks for session data
bash
# Verify current module version and upgrade
cpan PAGI::Middleware::Session::Store::Cookie
# Or using cpanm
cpanm PAGI::Middleware::Session::Store::Cookie@0.001004

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechPagi

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-338
  • Technical References
  • MetaCPAN Cookie Store Code

  • MetaCPAN Cookie Store Changes

  • OpenWall OSS-Security Discussion
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English