Insecure temporary directory in PHPUnit allows local code execution
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
PHPUnit from 13.4.0 before 13.4.4 creates PHPT code coverage files in a predictable phpunit-phpt directory under the system temporary path and reuses it without checking ownership or permissions (CWE-379). On multi-user systems with a shared temporary path, a local attacker who creates that directory first can replace a job file before it runs, executing code with the developer's privileges.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
PHPUnit is a testing framework for PHP. From 13.4.0 until 13.4.4, the TestCase::coverageFilesDirectory() logic in src/Runner/Phpt/TestCase.php creates temporary files for PHPT code coverage in a predictable phpunit-phpt directory under sys_get_temp_dir() and reuses that directory without verifying its ownership or permissions. On multi-user systems with a shared temporary path, a local attacker who creates the directory before the developer runs PHPT tests with code coverage can replace the generated job file before the child process executes it with require, allowing arbitrary code execution with the developer's privileges while the test and coverage report appear successful. PHPUnit 12.5 and earlier, default macOS and Windows configurations with per-user temporary directories, and single-user environments where another user cannot create files in the temporary path are not affected. This issue is fixed in 13.4.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sebastianbergmann | phpunit | 13.4.0 to before 13.4.4 | 13.4.4 | Patch available | CNA |
| — | phpunit/phpunit (Packagist) | 13.4.0 to before 13.4.4 | 13.4.4 | Patch available | GHSA-9vw2-f4vp-x7gf |
- phpunit Vendorsebastianbergmann Affected 13.4.0 to before 13.4.4 Fixed in 13.4.4 Patch available CNA
- phpunit/phpunit (Packagist) Vendor— Affected 13.4.0 to before 13.4.4 Fixed in 13.4.4 Patch available GHSA-9vw2-f4vp-x7gf
Remediation
Upgrade PHPUnit to 13.4.4, which fixes this flaw in the sebastianbergmann/phpunit and phpunit/phpunit Packagist packages. Installations from 13.4.0 before 13.4.4 are affected.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA phpunit (sebastianbergmann) Fixed in 13.4.4
- Fix · GHSA-9vw2-f4vp-x7gf phpunit/phpunit (Packagist) Fixed in 13.4.4 Advisory →
Vendor assessments
Timeline
- 2026-10-29 Threatist record created from CVE-2026-119193
- 2026-10-30 CISA SSVC decision points changed
- 2026-10-30 Priority changed: MEDIUM → LOW
- 2026-10-30 Alias added: GHSA-9vw2-f4vp-x7gf
- 2026-10-30 Fix available: Packagist/phpunit/[email protected] · GHSA-9vw2-f4vp-x7gf
- 2026-10-30 CVSS score added · GHSA-9vw2-f4vp-x7gf
- 2026-10-30 Weakness changed · GHSA-9vw2-f4vp-x7gf
- 2026-10-30 6 new references · GHSA-9vw2-f4vp-x7gf
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
Other 5
- https://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-9vw2-f4vp-x7gf
- https://github.com/sebastianbergmann/phpunit/commit/ae31c78a86e9d6c641497bacf47462d7bb7d7f34
- https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.4
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2026-119193.yaml
- https://github.com/sebastianbergmann/phpunit
Sources
- CVE-2026-119193 · CVE Program
- CVE-2026-119193 · NVD
- FIRST EPSS
- GHSA-9vw2-f4vp-x7gf · GitHub Advisory Database · CC BY 4.0
- CVE-2026-119193 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences