CVE-2026-24765 | PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling

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.

Published: 2026-01-27 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-24765 is rated Moderate Risk (40.4/100): CVSS High severity, with low exploitation likelihood (EPSS 0.34%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2026-24765

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.16% 0.34% +0.18%
2 2026-05-13 0.05% 0.16% +0.11%
3 2026-02-28 0.05%

Full EPSS history (5 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-24765

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]

Weakness enumeration for CVE-2026-24765

GitHub Security Advisory for CVE-2026-24765

GHSA-vvj3-c3rp-c85p · Severity: high · Ecosystem: composer — PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling

OS Trackers for CVE-2026-24765

vendor priority summary link
alpine CVE-2026-24765: 1 source package rows (phpunit); 3 state rows across 2 repos (3.23-community, edge-community); fixed 0, open 3. https://security.alpinelinux.org/vuln/CVE-2026-24765
debian not yet assigned CVE-2026-24765 not yet assigned priority: Debian including 1 source packages (phpunit), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 4, open 1. https://security-tracker.debian.org/tracker/CVE-2026-24765
redhat high https://access.redhat.com/security/cve/CVE-2026-24765
ubuntu medium CVE-2026-24765 medium priority: Ubuntu including 1 source packages (phpunit), 7 status rows across 7 suites (bionic, focal, jammy, noble, questing, upstream, xenial): needs-triage 7. https://ubuntu.com/security/CVE-2026-24765

Affected software / configurations for CVE-2026-24765

Vendor Product Version Raw CPE
phpunit_project phpunit < 8.5.52 cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:-:*:*
phpunit_project phpunit >= 9.0.0, < 9.6.33 cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:-:*:*
phpunit_project phpunit >= 10.0.0, < 10.5.62 cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:-:*:*
phpunit_project phpunit >= 11.0.0, < 11.5.50 cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:-:*:*
phpunit_project phpunit >= 12.0.0, < 12.5.8 cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:-:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

References for CVE-2026-24765

cvelogic Threat Intelligence