A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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 file write access can execute arbitrary code during test runs with coverage enabled.

Updated: May 14, 2026

CVE-2026-24765 Overview

CVE-2026-24765 is an unsafe deserialization vulnerability in PHPUnit, a widely used testing framework for PHP. The flaw resides in the cleanupForCoverage() method, which deserializes .coverage files during PHPT test execution without the allowed_classes parameter restriction. An attacker with local file write access to the coverage file location can stage a malicious serialized object containing a __wakeup() method. When PHPUnit runs tests with code coverage instrumentation enabled, the crafted object triggers arbitrary code execution. The issue is tracked under [CWE-502: Deserialization of Untrusted Data].

Critical Impact

Local attackers with write access to coverage file paths can achieve arbitrary code execution in CI/CD pipelines and developer environments running PHPUnit with coverage enabled.

Affected Products

  • PHPUnit versions prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52
  • Debian Linux 11.0 (phpunit package)
  • PHP applications and CI/CD pipelines invoking PHPT tests with code coverage instrumentation

Discovery Timeline

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

Technical Details for CVE-2026-24765

Vulnerability Analysis

The vulnerability stems from how PHPUnit handles pre-existing .coverage files during PHPT test execution. The cleanupForCoverage() method calls PHP's unserialize() on file contents without specifying ['allowed_classes' => false]. PHP's deserialization will then instantiate any class declared in the serialized payload and invoke magic methods such as __wakeup() or __destruct(). Attackers can chain existing application or dependency classes into a POP (Property-Oriented Programming) gadget chain to execute arbitrary code. Exploitation requires the attacker to write a malicious .coverage file to a location PHPUnit reads from before tests run.

Root Cause

The root cause is missing input validation on serialized data. The cleanupForCoverage() method assumed .coverage files would only ever be written by PHPUnit itself. It did not enforce the allowed_classes restriction available in PHP's unserialize() API. Because PHPT test runs expect no pre-existing coverage file, the presence of one represents an anomalous state that the original code silently consumed instead of rejecting.

Attack Vector

Exploitation requires local file write access to the directory where PHPUnit stores or expects PHPT code coverage files. Plausible attack paths include compromised CI/CD pipelines with shared runners, malicious or compromised third-party dependencies, and multi-tenant developer environments. The attacker plants a crafted .coverage file containing a serialized object referencing a gadget class with a dangerous __wakeup() or __destruct() implementation. When a developer or pipeline triggers phpunit with coverage instrumentation enabled, the gadget chain fires and executes arbitrary PHP code under the privileges of the test runner.

No verified public proof-of-concept code is available. Refer to the GitHub Security Advisory GHSA-vvj3-c3rp-c85p and the upstream commit for the precise fix details.

Detection Methods for CVE-2026-24765

Indicators of Compromise

  • Presence of .coverage files in PHPT test directories prior to a test run starting
  • Unexpected child processes spawned by phpunit or PHP CLI during test execution
  • Outbound network connections originating from CI/CD runners during the test phase
  • Modifications to source files, SSH keys, or CI secrets immediately after a phpunit invocation

Detection Strategies

  • Audit installed PHPUnit versions across developer workstations, build agents, and container images against the patched releases
  • Hash and inventory all .coverage files produced by CI builds, alerting on files that appear before phpunit execution begins
  • Inspect pipeline logs for the new explicit error message emitted by patched PHPUnit when a stale .coverage file is detected
  • Monitor for serialized PHP object signatures (strings beginning with O: followed by class names) inside files in coverage output directories

Monitoring Recommendations

  • Enable process and file integrity monitoring on CI/CD runners, especially around the workspace and temporary directories used by PHPUnit
  • Collect and centralize build logs for retroactive search against known indicators tied to CVE-2026-24765
  • Alert on writes to .coverage paths by any process other than phpunit itself

How to Mitigate CVE-2026-24765

Immediate Actions Required

  • Upgrade PHPUnit to 12.5.8, 11.5.50, 10.5.62, 9.6.33, or 8.5.52 depending on the supported branch in use
  • Apply the Debian LTS update referenced in the Debian LTS announcement for Debian 11 systems
  • Scrub all coverage output directories on CI/CD runners and developer machines before the next test run
  • Rotate any credentials, tokens, or signing keys exposed to potentially affected pipelines

Patch Information

The maintainer chose to treat pre-existing .coverage files for PHPT tests as an explicit error rather than silently sanitizing input. Starting with versions 12.5.8, 11.5.50, 10.5.62, and 9.6.33, PHPUnit emits a clear error message when it detects an anomalous pre-existing .coverage file. Patched releases are available on GitHub: PHPUnit 12.5.8, PHPUnit 11.5.50, PHPUnit 10.5.63, PHPUnit 9.6.33, and PHPUnit 8.5.52. The upstream fix is captured in commit 3141742e.

Workarounds

  • Use ephemeral CI/CD runners that are destroyed after each job to eliminate persistent attacker-staged files
  • Disable code coverage instrumentation on untrusted branches or pull requests from forks
  • Enforce branch protection, mandatory code review, and artifact isolation between jobs to limit dependency tampering
  • Restrict file system permissions so only the CI user can write to the PHPUnit coverage directory, and clear that directory at job start
bash
# Configuration example
# Upgrade PHPUnit via Composer to a patched release
composer require --dev phpunit/phpunit:^12.5.8

# Pre-job cleanup to remove any stale or attacker-planted coverage files
find . -type f -name '*.coverage' -print -delete

# Run tests with coverage only after verifying the workspace is clean
vendor/bin/phpunit --coverage-text

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.16%

  • 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
  • PHPUnit Release 10.5.63

  • PHPUnit Release 11.5.50

  • PHPUnit Release 12.5.8

  • PHPUnit Release 8.5.52

  • PHPUnit Release 9.6.33

  • Debian LTS Announcement
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-41570: PHPUnit RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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