Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-24765

CVE-2026-24765: PHPUnit RCE Vulnerability

CVE-2026-24765 is a remote code execution vulnerability in PHPUnit caused by unsafe deserialization of code coverage data. Attackers with local file write access can execute arbitrary code during test runs.

Published: January 30, 2026

CVE-2026-24765 Overview

CVE-2026-24765 is an insecure deserialization vulnerability affecting PHPUnit, a widely-used testing framework for PHP. The vulnerability exists in the cleanupForCoverage() method, which deserializes code coverage files without proper validation. This flaw potentially allows remote code execution if malicious .coverage files are present prior to the execution of PHPT tests.

The vulnerability occurs when a .coverage file—which should not exist before test execution—is deserialized without the allowed_classes parameter restriction. An attacker with local file write access can place a malicious serialized object containing a __wakeup() method into the file system, leading to arbitrary code execution during test runs with code coverage instrumentation enabled.

Critical Impact

Arbitrary code execution through malicious deserialization during PHPUnit test execution with code coverage enabled, potentially compromising CI/CD pipelines and development environments.

Affected Products

  • PHPUnit versions prior to 12.5.8
  • PHPUnit versions prior to 11.5.50
  • PHPUnit versions prior to 10.5.62
  • PHPUnit versions prior to 9.6.33
  • PHPUnit versions prior to 8.5.52

Discovery Timeline

  • 2026-01-27 - CVE CVE-2026-24765 published to NVD
  • 2026-01-29 - Last updated in NVD database

Technical Details for CVE-2026-24765

Vulnerability Analysis

This insecure deserialization vulnerability (CWE-502) resides in PHPUnit's code coverage handling for PHPT tests. The cleanupForCoverage() method processes .coverage files using PHP's native unserialize() function without specifying the allowed_classes parameter. This omission allows arbitrary PHP objects to be instantiated during deserialization.

PHP object deserialization is particularly dangerous because certain magic methods—such as __wakeup(), __destruct(), and __toString()—are automatically invoked during or after deserialization. Attackers can craft serialized payloads containing objects with malicious code in these magic methods, creating a "POP chain" (Property Oriented Programming) that executes arbitrary code when the object is deserialized.

The vulnerability requires local file write access to the location where PHPUnit stores or expects code coverage files for PHPT tests. This prerequisite can be satisfied through several attack vectors including CI/CD pipeline attacks, compromised local development environments, and/or malicious or compromised dependencies.

Root Cause

The root cause is the unsafe use of PHP's unserialize() function without the allowed_classes parameter restriction in the cleanupForCoverage() method. When processing .coverage files, the code assumes these files are trusted and contain only expected data structures. However, if an attacker can write a malicious serialized payload to this location before test execution, the deserialization will instantiate arbitrary objects, triggering their magic methods and enabling code execution.

Attack Vector

The attack requires local access to write files to the directory where PHPUnit expects .coverage files for PHPT tests. Attack scenarios include:

  1. CI/CD Pipeline Compromise: An attacker with access to the CI/CD environment can inject malicious .coverage files before test execution, potentially through compromised build artifacts or pipeline configuration manipulation.

  2. Compromised Dependencies: A malicious or compromised package dependency could write serialized payloads to the expected location during installation or build processes.

  3. Local Development Environment: In shared or compromised development environments, an attacker could place malicious files targeting developers running tests with code coverage enabled.

The attacker constructs a serialized PHP object with a __wakeup() or __destruct() method containing malicious code. When PHPUnit processes the .coverage file during test execution with code coverage instrumentation, the object is deserialized and the malicious code executes with the privileges of the test runner.

Detection Methods for CVE-2026-24765

Indicators of Compromise

  • Unexpected .coverage files present in PHPUnit test directories prior to test execution
  • Anomalous file creation activity in test artifact directories within CI/CD pipelines
  • Unusual PHP process behavior or network connections during test execution
  • Serialized PHP object signatures in .coverage files containing unexpected class names

Detection Strategies

  • Monitor file system activity for unexpected .coverage file creation in PHPUnit test directories before test execution begins
  • Implement file integrity monitoring on CI/CD build directories to detect unauthorized file modifications
  • Analyze PHPUnit execution logs for error messages related to pre-existing .coverage files (available in patched versions)
  • Audit dependencies for known malicious packages that could inject files during build processes

Monitoring Recommendations

  • Enable verbose logging for CI/CD pipeline execution to capture file system changes
  • Implement runtime monitoring for PHP process spawning and network connections during test execution
  • Deploy SentinelOne agents on CI/CD runners and development workstations to detect suspicious deserialization activity
  • Configure alerts for unexpected file modifications in test artifact directories

How to Mitigate CVE-2026-24765

Immediate Actions Required

  • Upgrade PHPUnit to a patched version (12.5.8, 11.5.50, 10.5.63, 9.6.33, or 8.5.52 depending on your version branch)
  • Audit existing .coverage files in your codebase and CI/CD artifacts for unexpected content
  • Implement ephemeral CI/CD runners that start from a clean state for each build
  • Enable branch protection and mandatory code review to prevent unauthorized pipeline modifications

Patch Information

The PHPUnit maintainer has addressed this vulnerability by treating pre-existing .coverage files for PHPT tests as an error condition rather than silently sanitizing the input. Starting in patched versions, when a .coverage file is detected for a PHPT test prior to execution, PHPUnit will emit a clear error message identifying the anomalous state.

Patched versions are available:

  • PHPUnit 12.5.8
  • PHPUnit 11.5.50
  • PHPUnit 10.5.63
  • PHPUnit 9.6.33
  • PHPUnit 8.5.52

For technical details, see the GitHub Security Advisory and the commit implementing the fix.

Workarounds

  • Use ephemeral CI/CD runners that provide a clean environment for each build, eliminating the possibility of persistent malicious files
  • Implement strict access controls on directories where PHPUnit stores code coverage files
  • Add pre-test hooks to verify no .coverage files exist before test execution begins
  • Isolate test artifacts and enforce directory cleanup between test runs
bash
# Pre-test cleanup script to remove any existing .coverage files
#!/bin/bash
# Run before PHPUnit execution to ensure clean state
find ./tests -name "*.coverage" -type f -delete
find ./vendor -name "*.coverage" -type f -delete
echo "Cleaned up pre-existing .coverage files"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechPhpunit

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.08%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-502
  • Technical References
  • GitHub Commit Change

  • GitHub Release 10.5.63

  • GitHub Release 11.5.50

  • GitHub Release 12.5.8

  • GitHub Release 8.5.52

  • GitHub Release 9.6.33

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-11419: Keycloak TLS DoS Vulnerability

  • CVE-2025-13947: WebKitGTK Information Disclosure Flaw

  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal 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