Skip to content
Laskyr

phpunit/phpunit security advisory

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

CVE-2026-119193 is a medium-severity remote code execution vulnerability in the PHP package phpunit/phpunit (CVSS 5.4), published 29 October 2026. It is fixed in 13.4.4; earlier versions are affected. Exploiting it needs a low-privilege user account.

medium 5.4 published 2026-10-29 · updated 2026-10-30

Fixed in phpunit/phpunit 13.4.4

This remote code execution issue affects phpunit/phpunit versions >= 13.4.0, < 13.4.4. Upgrade to the fixed version for your release line (13.4.4). The newest release, 13.4.6, is not affected.

Affected versions
>= 13.4.0, < 13.4.4
Fixed in
13.4.4
Newest release
13.4.6
Severity
Medium · CVSS 5.4
Type
Remote code execution
CWE-379
Exploited in the wild
Not on the CISA KEV list
checked 2026-11-04

Is your phpunit/phpunit version affected?

Run composer show phpunit/phpunit in your project, then enter the version. We check it against this and every other known phpunit/phpunit advisory.

Who can exploit CVE-2026-119193

CVSS vector (scored by GitHub): CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Your app is only exposed if it uses the affected part of phpunit/phpunit. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

How to fix CVE-2026-119193 in phpunit/phpunit

  1. Find the installed version: composer show phpunit/phpunit. If you never required it yourself, composer why phpunit/phpunit shows which package pulls it in.
  2. Update it: composer update phpunit/phpunit --with-all-dependencies. You need 13.4.4 or newer.
  3. If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example "phpunit/phpunit": "^13.4.4" if you can take that version), or upgrade the package that requires it.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-119193.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for remote code execution issues while the upgrade waits. None of it replaces the fix.

The CVE-2026-119193 advisory

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.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-119193. Advisory title: “PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling”.

References

Other phpunit/phpunit advisories

Related

Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.

Ask about a fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit