# PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling

Advisory record · `GHSA-vvj3-c3rp-c85p`

- **Identifiers:** `GHSA-vvj3-c3rp-c85p` · `CVE-2026-24765` · `PKSA-z3gr-8qht-p93v`
- **State:** Confirmed
- **Severity:** CVSS 7.8 High
- **Critical:** No
- **Weakness (CWE):** [CWE-502](https://cwe.mitre.org/data/definitions/502.html)
- **Tags:** [Insecure deserialization](https://agentprime.io/advisories/tag/deserialization.md)
- **Published:** 27 Jan 2026
- **Updated:** 5 May 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 27 Jan 2026, 22:26 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `phpunit/phpunit` (Packagist): affected `<8.5.52 || >=9.0.0, <9.6.33 || >=10.0.0, <10.5.62 || >=11.0.0, <11.5.50 || >=12.0.0, <12.5.8`; fixed in `8.5.52`, `9.6.33`, `10.5.62`, `11.5.50`, `12.5.8`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> PHPUnit versions before 8.5.52, 9.0.0 through 9.6.33, 10.0.0 through 10.5.62, 11.0.0 through 11.5.50, and 12.0.0 through 12.5.8 are affected. An attacker with local file write access to the location where PHPUnit expects code coverage files for PHPT tests can place a malicious serialized .coverage file, which is unsafely deserialized and may lead to arbitrary code execution when tests run with coverage enabled. Upgrade to 8.5.52, 9.6.33, 10.5.62, 11.5.50, or 12.5.8, depending on your major version.

Written 3 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.8 High, CVSS 3.1: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0038, the 33rd percentile, on 14 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:25 UTC: First seen by agentprime
- 31 Oct 2026, 14:25 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-vvj3-c3rp-c85p)

## Sources

- [GitHub Advisory Database: GHSA-vvj3-c3rp-c85p](https://github.com/advisories/GHSA-vvj3-c3rp-c85p)
- [OSV: GHSA-vvj3-c3rp-c85p](https://osv.dev/vulnerability/GHSA-vvj3-c3rp-c85p)
- <https://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-vvj3-c3rp-c85p>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-24765>
- <https://github.com/sebastianbergmann/phpunit/commit/3141742e00620e2968d3d2e732d320de76685fda>
- <https://github.com/sebastianbergmann/phpunit/commit/613d142f5a8471ca71623ce5ca2795f79248329e>
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2026-24765.yaml>
- <https://github.com/sebastianbergmann/phpunit>
- <https://github.com/sebastianbergmann/phpunit/releases/tag/10.5.63>
- <https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.50>
- <https://github.com/sebastianbergmann/phpunit/releases/tag/12.5.8>
- <https://github.com/sebastianbergmann/phpunit/releases/tag/8.5.52>
- <https://github.com/sebastianbergmann/phpunit/releases/tag/9.6.33>
- <https://lists.debian.org/debian-lts-announce/2026/02/msg00009.html>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-vvj3-c3rp-c85p>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-vvj3-c3rp-c85p/>. Everything for agents: <https://agentprime.io/llms.txt>.
