Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpunit/phpunit
  4. ›
  5. CVE-2026-119193

CVE-2026-119193: PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling

October 30, 2026

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. macOS and Windows use per-user temporary directories by default and are not affected in their default configuration. PHPUnit 12.5 and earlier are not affected.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2026-119193.yaml
  • github.com/advisories/GHSA-9vw2-f4vp-x7gf
  • github.com/sebastianbergmann/phpunit/commit/ae31c78a86e9d6c641497bacf47462d7bb7d7f34
  • github.com/sebastianbergmann/phpunit/releases/tag/13.4.4
  • github.com/sebastianbergmann/phpunit/security/advisories/GHSA-9vw2-f4vp-x7gf
  • nvd.nist.gov/vuln/detail/CVE-2026-119193

Code Behaviors & Features

Detect and mitigate CVE-2026-119193 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 13.4.0 before 13.4.4

Fixed versions

  • 13.4.4

Solution

Upgrade to version 13.4.4 or above.

Impact 7.3 HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-379: Creation of Temporary File in Directory with Insecure Permissions

Source file

packagist/phpunit/phpunit/CVE-2026-119193.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 16 Nov 2026 00:17:55 +0000.