Appsecure logo

CVE-2026-24765: High Vulnerability in PHPUnit

A high-severity vulnerability in PHPUnit could allow remote code execution due to unsafe deserialization of code coverage data. Organizations are advised to patch immediately to mitigate risks.

HIGHCVSS 7.8 · Published January 27, 2026

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

A vulnerability has been discovered in PHPUnit, a widely used testing framework for PHP. This vulnerability allows unsafe deserialization of code coverage data during PHPT test execution, potentially leading to remote code execution. The vulnerability affects versions prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52.

The vulnerability occurs in the `cleanupForCoverage()` method, which deserializes code coverage files without proper validation. An attacker with local file write access can place a malicious serialized object into the file system, which may be executed during test runs, especially when code coverage instrumentation is enabled.

Organizations should prioritize patching immediately to prevent potential exploitation of this vulnerability, which can be exploited during CI/CD processes or in local development environments.

The severity of this vulnerability is classified as high, with a CVSS score of 7.8. Given the potential for remote code execution, it poses a significant risk to organizations using affected versions of PHPUnit.

Organizations should ensure proper CI/CD configurations, including ephemeral runners, code review enforcement, and access control, to mitigate the risks associated with this vulnerability.

Vulnerability Details

The vulnerability in PHPUnit is classified under CWE-502, which pertains to unsafe deserialization. The affected versions include PHPUnit versions prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52.

The CVSS score for this vulnerability is 7.8, indicating a high severity level. The vulnerability allows local attackers to exploit the deserialization process, leading to potential remote code execution.

The vulnerability was published on January 27, 2026, and is currently classified as 'Analyzed'.

Technical Analysis

The root cause of this vulnerability is the unsafe deserialization of code coverage files during the execution of PHPT tests. The `cleanupForCoverage()` method does not adequately validate the input before deserializing the code coverage files.

The attack vector for this vulnerability is local, requiring an attacker to have local file write access. The attack complexity is low, as attackers can easily create malicious `.coverage` files that will be deserialized without restrictions.

Privileges required for exploitation are low, as the attacker only needs write access to the filesystem where PHPUnit expects the code coverage files.

No user interaction is required for this vulnerability to be exploited, making it particularly dangerous.

The vulnerability impacts confidentiality, integrity, and availability, all classified as high, indicating that successful exploitation could lead to significant damage.

Risk & Impact Analysis

The real-world deployment risk associated with this vulnerability is substantial. Organizations using affected versions of PHPUnit are at risk of remote code execution, which can lead to data breaches, unauthorized access, and system compromises.

Given the high potential for exploitation, organizations need to understand the blast radius of this vulnerability. A successful attack can result in widespread damage across applications that utilize PHPUnit for testing.

The urgency for remediation is high due to the CVSS score of 7.8 and the absence of known exploits. Organizations should prioritize patching this vulnerability in their upcoming patch cycles.

Exploitation Status

Signal

Status

Known Exploit

No

Public PoC

No

Actively Exploited

No

Ransomware Use

No

Affected Versions

The affected versions of PHPUnit include those prior to 12.5.8, 11.5.50, 10.5.62, 9.6.33, and 8.5.52. All versions prior to these releases are vulnerable to this issue.

Mitigation & Remediation

Organizations are advised to upgrade PHPUnit to versions 12.5.8, 11.5.50, 10.5.62, 9.6.33, or 8.5.52 to mitigate this vulnerability. Proper CI/CD configurations including ephemeral runners, code review enforcement, and artifact isolation are essential for reducing the risk.

In addition, organizations may consider implementing access controls to limit file write access to the locations where PHPUnit stores code coverage files.

For more information on effective penetration testing and security assessments, organizations can explore penetration testing services that offer insights into potential vulnerabilities.

Detection Guidance

Organizations should monitor logs for any indicators of unauthorized file writes in the directories used by PHPUnit for code coverage files. Behavioral anomalies during test execution may also indicate potential exploitation.

Monitoring changes to system files and configurations within the CI/CD pipeline can also provide insights into potential threats.

AppSecure Threat Intelligence Insight

The long-term significance of CVE-2026-24765 lies in its demonstration of the risks associated with unsafe deserialization in software frameworks. It highlights the need for robust validation mechanisms in code execution paths, especially in environments that involve local file access.

Security teams should take this incident as a reminder of the importance of code reviews and secure coding practices to prevent similar vulnerabilities.

For further insights and best practices, organizations can refer to resources on penetration testing methodology and vulnerability management programs that can help in identifying and mitigating security weaknesses.

Additionally, organizations should assess their current security posture against the evolving threat landscape by utilizing resources such as API penetration testing guides to ensure comprehensive coverage.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.