Security Resilience

CVE-2026-24765

Deserialization in Phpunit Project Phpunit ≤ 8.5.52

Published
27 January 2026
Modified
03 March 2026
Patch / advisory
CVSS Score v3.1 7.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0090 58th percentile
Risk Priority 59 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-24765 is a high-severity Deserialization of Untrusted Data (CWE-502) vulnerability in Phpunit Project Phpunit. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 42% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-24765 is a deserialization vulnerability in PHPUnit, a testing framework for PHP, affecting versions prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52. The issue resides in the `cleanupForCoverage()` method, which deserializes code coverage files (`.coverage`) without validation, such as the `allowed_classes` parameter restriction, during PHPT test execution. This unsafe deserialization occurs if a `.coverage` file exists unexpectedly before test execution, potentially leading to remote code execution when code coverage instrumentation is enabled.

An attacker requires local file write access to the directory where PHPUnit stores or expects code coverage files for PHPT tests. They can place a malicious serialized object with a `__wakeup()` method into a `.coverage` file, triggering arbitrary code execution upon deserialization during test runs. Exploitation is feasible in scenarios like CI/CD pipeline attacks, local development environments, or through compromised dependencies, with a CVSS score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) and associated CWE-502.

Patches in versions 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52 detect pre-existing `.coverage` files for PHPT tests prior to execution and emit a clear error message instead of silently sanitizing input. Organizations can mitigate risk by updating to these versions and implementing CI/CD best practices, such as ephemeral runners, code review enforcement, branch protection, artifact isolation, and access control. Relevant details are available in the fix commit and release notes on GitHub.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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,…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-49113Shared CWE-502
CVE-2023-27372Shared CWE-502
CVE-2025-64512Shared CWE-502
CVE-2021-42392Shared CWE-502
CVE-2023-46604Shared CWE-502
CVE-2019-17571Shared CWE-502
CVE-2025-24813Shared CWE-502
CVE-2026-64678Shared CWE-502
CVE-2024-3054Shared CWE-502
CVE-2024-32876Shared CWE-502

Affected Assets

phpunit project
phpunit
≤ 8.5.52 · 9.0.0 — 9.6.33 · 10.0.0 — 10.5.62
debian
debian linux
11.0

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing and evaluation can uncover deserialization flaws before deployment.

Input validation directly stops deserialization of untrusted data by ensuring inputs are valid before processing.

Engineering principles such as safe deserialization and input sanitization structurally prevent the weakness from being introduced.

Integrity verification tools can detect malformed or tampered serialized data after the fact.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing includes validation of deserialization routines and the use of untrusted data, reducing the likelihood that unsafe object reconstruction will be deployed.

prevents

Training technical teams on secure deserialization practices reduces a minority of CWE-502 instances, but developers remain fallible and the owner explicitly identified A.8.29 (security testing) as the strongest control for this weakness, with A.8.28 (secure coding) graded only `partial` on the same pair.

prevents

Requiring vetted libraries, regular updates and SAST before release reduces the likelihood that deserialization logic will accept and act on attacker-controlled serialized objects.

finds

Regular scanning of third-party libraries and timely patching reduce the likelihood that unsafe deserialization vulnerabilities remain active.

References