Deserialization of Untrusted Data in PHPUnit - CVE-2026-24765

 

Deserialization of Untrusted Data in PHPUnit - CVE-2026-24765

Published: April 17, 2026


Vulnerability identifier: #VU126452
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2026-24765
CWE-ID: CWE-502
Exploitation vector: Local access
Exploit availability: No public exploit available
Vendor: sebastianbergmann
Affected software:
PHPUnit

Detailed vulnerability description

The vulnerability allows a local user to execute arbitrary code.

The vulnerability exists due to deserialization of untrusted data in the cleanupForCoverage() method of the PHPT test runner when processing a pre-existing .coverage file during PHPT test execution with code coverage instrumentation enabled. A local user can place a malicious serialized object in a .coverage file to execute arbitrary code.

The issue is triggered only if a .coverage file is present before test execution.


How to mitigate CVE-2026-24765

Install security update from vendor's website.

Sources