Packagist
CVE-2026-119193
PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling
- Severity
- Medium
- Published
- 30 Oct 2026
- Last changed
- 30 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 13.4.4
- Exploit chance
- 0.1% in the next 30 daysHigher than 3% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- CWE-379
- Also known as
- GHSA-9vw2-f4vp-x7gf
- Sources
- OSV.dev and GitHub
Description
When PHPT tests are run with code coverage, PHPUnit 13.4.0 to 13.4.3 writes the code of each PHPT test to a directory with a fixed name below the operating system's path used for temporary files, for instance /tmp/phpunit-phpt on Linux, and executes it from there. PHPUnit uses this directory even when it was created by another user.
On a system where the path used for temporary files is shared between users, another local user can create this directory before the developer runs PHPUnit, replace the code of a PHPT test before it is executed, and thereby execute arbitrary code with the privileges of the developer. The test still passes and the code coverage report is complete, so the attack is not visible.
The impact is full code execution as the user who runs PHPUnit. The likelihood is low: the attacker needs an account on the same system and must create the directory before the developer runs PHPT tests with code coverage.
Affected software
| Software | Affected versions |
|---|---|
phpunit/phpunitPackagist · osv:Packagist:phpunit/phpunit |
|
About phpunit/phpunit
- Monthly downloads (Packagist)
- 33,513,907Packagist, 23 Nov 2026
- Total downloads (Packagist)
- 1,063,317,119Packagist, 23 Nov 2026
This is the only vulnerability in phpunit/phpunit in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-119193
- GitHub Advisory Database https://github.com/advisories/GHSA-9vw2-f4vp-x7gf