Skip to content

← Actionable
Medium, CVSS 5.4amended

PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling

CVE-2026-119193GHSA-9vw2-f4vp-x7gf

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (phpunit/phpunit 13.4.4), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
5.4 · 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 · score source
EPSS
  • CVE-2026-119193: 0.11% estimated exploitation activity in the next 30 days; percentile 1.43 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from osv record GHSA-9vw2-f4vp-x7gf

  2. Revision 1 · created ·

    Published from ghsa record GHSA-9vw2-f4vp-x7gf

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-119193

Advisory: PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling
IDs: CVE-2026-119193, GHSA-9vw2-f4vp-x7gf
Record: https://patchnext.com/advisories/cve-2026-119193 (revision 2, source checked 31 Oct 2026, 06:45 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.4)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: phpunit/phpunit 13.4.4. A vendor fix does not mean a deployment is fixed.

## Affected components
- Packagist phpunit/phpunit: affected >= 13.4.0, < 13.4.4; fixed in 13.4.4

## Suggested inspection (read-only)
- Packagist phpunit/phpunit: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on phpunit/phpunit.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-9vw2-f4vp-x7gf (GitHub-reviewed advisory GHSA-9vw2-f4vp-x7gf lists affected ranges: Packagist phpunit/phpunit >=13.4.0 <13.4.4)
- Verified: https://osv.dev/vulnerability/GHSA-9vw2-f4vp-x7gf (OSV record GHSA-9vw2-f4vp-x7gf lists affected ranges: Packagist phpunit/phpunit >=13.4.0 <13.4.4 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…