cve.bz

CVE-2026-24765 Deserialization of Untrusted Data

7.8 highEPSS 0.4%Fix available

High (7.8). EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in phpunit/phpunit 10.5.62, 11.5.50, 12.5.8.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 33rd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-01-28. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-24765 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-24765?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-24765?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-24765 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
phpunit_project:phpunitbefore 8.5.52
phpunit_project:phpunitfrom 9.0.0 before 9.6.33
phpunit_project:phpunitfrom 10.0.0 before 10.5.62
phpunit_project:phpunitfrom 11.0.0 before 11.5.50
phpunit_project:phpunitfrom 12.0.0 before 12.5.8
debian:debian_linux11.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-vvj3-c3rp-c85pPackagistphpunit/phpunit<8.5.528.5.52
GHSA-vvj3-c3rp-c85pPackagistphpunit/phpunit>=9.0.0 <9.6.339.6.33
GHSA-vvj3-c3rp-c85pPackagistphpunit/phpunit>=10.0.0 <10.5.6210.5.62
GHSA-vvj3-c3rp-c85pPackagistphpunit/phpunit>=11.0.0 <11.5.5011.5.50
GHSA-vvj3-c3rp-c85pPackagistphpunit/phpunit>=12.0.0 <12.5.812.5.8

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11phpunit9.5.2-1+deb11u1DLA-4470-1
Debian12phpunit9.6.7-1+deb12u1DEBIAN-CVE-2026-24765
Debian13phpunit11.5.19-1+deb13u1DEBIAN-CVE-2026-24765
Debian14phpunit12.5.8-1DEBIAN-CVE-2026-24765
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 5 morephpunitno fix listedUBUNTU-CVE-2026-24765

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an IMPORTANT vulnerability in PHPUnit that allows arbitrary code execution. It requires an attacker to have local file write access to the system where PHPUnit tests are executed with code coverage instrumentation enabled. This typically impacts development and CI/CD environments, where malicious `.coverage` files could be introduced.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-24765.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON