CVE-2026-24765Phpunit Project Phpunit Deserialization of Untrusted Data
NVDCVSS scored by security-advisories@github.com
Vulnerability Summary
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.
CVSS v3.1 Base Metrics — Score 7.8 (HIGH)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HAttack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
Affected & Patched Versions
- Phpunit Project Phpunit < 8.5.52
- Phpunit Project Phpunit >= 9.0.0 and < 9.6.33
- Phpunit Project Phpunit >= 10.0.0 and < 10.5.62
- Phpunit Project Phpunit >= 11.0.0 and < 11.5.50
- Phpunit Project Phpunit >= 12.0.0 and < 12.5.8
- Debian Debian Linux
- Phpunit Project Phpunit 8.5.52
- Phpunit Project Phpunit 9.6.33
- Phpunit Project Phpunit 10.5.62
- Phpunit Project Phpunit 11.5.50
- Phpunit Project Phpunit 12.5.8
What to do
Plan remediation soon. No exploitation is confirmed yet, but the severity is high.
- Check whether you run Phpunit Project Phpunit and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Jan 27, 2026Published
- Mar 3, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Phpunit Project Phpunit CVEsYou are reading CVE-2026-24765. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsRelated Coverage
External References
- Patchhttps://github.com/sebastianbergmann/phpunit/commit/3141742e00620e2968d3d2e732d320de76685fda
- Referencehttps://github.com/sebastianbergmann/phpunit/releases/tag/10.5.63
- Referencehttps://github.com/sebastianbergmann/phpunit/releases/tag/11.5.50
- Referencehttps://github.com/sebastianbergmann/phpunit/releases/tag/12.5.8
- Referencehttps://github.com/sebastianbergmann/phpunit/releases/tag/8.5.52
- Referencehttps://github.com/sebastianbergmann/phpunit/releases/tag/9.6.33
- Vendor Advisoryhttps://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-vvj3-c3rp-c85p
- Advisoryhttps://lists.debian.org/debian-lts-announce/2026/02/msg00009.html
Data last checked: Nov 19, 2026 04:06 UTC