Cyber 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.0034 27th percentile
Risk Priority 56 floored blend · peak EPSS

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 Exploit Public-Facing Application (T1190); ranked at the 27th percentile by exploit likelihood (below the median); 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

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.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-64512Same product: Debian Debian Linux
CVE-2025-49113Same product: Debian Debian Linux
CVE-2023-27372Same product: Debian Debian Linux
CVE-2021-42392Same product: Debian Debian Linux
CVE-2023-46604Same product: Debian Debian Linux
CVE-2019-17571Same product: Debian Debian Linux
CVE-2024-3301Shared CWE-502
CVE-2025-43713Shared CWE-502
CVE-2023-33299Shared CWE-502
CVE-2024-8514Shared 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) AI

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 (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-02 none match
prevents

PR.PS-02 addresses only post-deployment updates/patching and cannot prevent introduction of unsafe deserialization code, yet it can remediate some instances when the flaw exists in outdated libraries or components.

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

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — 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

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.

none

Mandatory malware scanning of data received over networks or storage media intercepts malicious serialized payloads before they are deserialized by the target application.

References