Read the docs

Insecure temporary directory in PHPUnit allows local code execution

Priority LOW 25CWE-379Published · Updated

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

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00113 1st percentileScored 2026-11-07
Fix Fixed phpunit (sebastianbergmann): 13.4.4phpunit/phpunit (Packagist): 13.4.4

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

VendorProductAffected versionsFixed inStatusSource
sebastianbergmannphpunit13.4.0 to before 13.4.413.4.4Patch availableCNA
—phpunit/phpunit (Packagist)13.4.0 to before 13.4.413.4.4Patch availableGHSA-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

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-29 Threatist record created from CVE-2026-119193
  2. 2026-10-30 CISA SSVC decision points changed
  3. 2026-10-30 Priority changed: MEDIUM → LOW
  4. 2026-10-30 Alias added: GHSA-9vw2-f4vp-x7gf
  5. 2026-10-30 Fix available: Packagist/phpunit/[email protected] · GHSA-9vw2-f4vp-x7gf
  6. 2026-10-30 CVSS score added · GHSA-9vw2-f4vp-x7gf
  7. 2026-10-30 Weakness changed · GHSA-9vw2-f4vp-x7gf
  8. 2026-10-30 6 new references · GHSA-9vw2-f4vp-x7gf
  9. 2026-11-06 Affected versions changed · Red Hat
  10. 2026-11-06 CVSS score added · Red Hat

References

Sources