CVE Tools

CVE-2026-24765

PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling

CVE-2026-24765 is a deserialization in Sebastianbergmann Phpunit (CVSS 7.8, High).

No known exploitation. EPSS puts it in the 58th percentile. Fixed in 8.5.52.

Check it yourself

OpenVAS · 12 checks

e.g. OID 1.3.6.1.4.1.25623.1.0.180431

Run the check

Published Updated Sources: CVE.org, NVD, GitHub

What to do

Find your product and version, then upgrade to the build on the right.

  • Sebastianbergmann PhpunitAffected: < 8.5.52Upgrade to: not statedAffected: >= 9.0.0, < 9.6.33Upgrade to: not statedAffected: >= 10.0.0, < 10.5.62Upgrade to: not statedAffected: >= 11.0.0, < 11.5.50Upgrade to: not stated + 1 more branchStated by: CVE record
  • Packagist phpunit/phpunitAffected: < 8.5.52Upgrade to: 8.5.52Stated by: GitHub advisory
  • Phpunit Project PhpunitAffected: < 8.5.52Upgrade to: 8.5.52Stated by: NVD

Versions as the sources state them. Full version matrix after sign-in

What it is

From the CVE record

PHPUnit is a testing framework for PHP. A vulnerability has been discovered in versions prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52 involving unsafe deserialization of code coverage data in PHPT test execution. The vulnerability exists in the `cleanupForCoverage()` method, which deserializes code coverage files without validation, potentially allowing remote code execution if malicious `.coverage` files are present prior to the execution of the PHPT test. 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 with a `__wakeup()` method into the file system, leading to arbitrary code execution during test runs with code coverage instrumentation enabled. This vulnerability requires local file write access to the location where PHPUnit stores or expects code coverage files for PHPT tests. This can occur through CI/CD pipeline attacks, the local development environment, and/or compromised dependencies. Rather than just silently sanitizing the input via `['allowed_classes' => false]`, the maintainer has chosen to make the anomalous state explicit by treating pre-existing `.coverage` files for PHPT tests as an error condition. Starting in versions in versions 12.5.8, 11.5.50, 10.5.62, 9.6.33, when a `.coverage` file is detected for a PHPT test prior to execution, PHPUnit will emit a clear error message identifying the anomalous state. Organizations can reduce the effective risk of this vulnerability through proper CI/CD configuration, including ephemeral runners, code review enforcement, branch protection, artifact isolation, and access control.

In plain language

No plain-language summary for this CVE yet.

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS58th
CISA KEV

Not in the catalog. CISA has not confirmed exploitation.

Public exploits

No public exploit or proof of concept found in the sources we track.

EPSS

0.9% chance of exploitation activity in the next 30 days, which ranks it in the 58th percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

7 events over 149 days, from the signal feeds we watch.

  1. OpenVAS check added
  2. Patch availableworkaround available, record updated
  3. Publishedweakness classified, att&ck mapped

Affected products

Technical detail

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Scored 7.8 by NVD.

How it is reached

  • Attack Vector LocalRequires local access to the vulnerable system (e.g. local login, malicious file)
  • Attack Complexity LowNo special conditions — the attack can be reliably reproduced
  • Privileges Required LowRequires basic user-level privileges
  • User Interaction NoneNo user interaction needed — fully automated exploitation

Scope

  • Scope UnchangedImpact is limited to the vulnerable component itself

Impact if exploited

  • Confidentiality HighTotal information disclosure — all data in the component is compromised
  • Integrity HighTotal loss of integrity — attacker can modify any data in the component
  • Availability HighTotal denial of service — the component is completely unavailable

Weaknesses

ATT&CK techniques

Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.

Sources

Questions about CVE-2026-24765

Is CVE-2026-24765 being exploited?
No exploitation is confirmed and no public exploit is known. EPSS puts the chance of exploitation in the next 30 days at 0.9%.
Which versions are affected by CVE-2026-24765?
Phpunit: < 8.5.52; >= 9.0.0, < 9.6.33; >= 10.0.0, < 10.5.62. Phpunit/phpunit: < 8.5.52. Phpunit: < 8.5.52.
How do I fix or mitigate CVE-2026-24765?
Upgrade to 8.5.52 or later. The advisory is on github.com.

Last updated

Related articles

All articles

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Phpunit, not every advisory.