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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.4
- **CVSS:** 5.4 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: Low; User interaction: Passive; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.16% (percentile 3, 2026-11-28)
- **CWE:** CWE-379
- **Aliases:** GHSA-9vw2-f4vp-x7gf
- **Published:** 2026-10-29T19:35:36.052Z
- **Modified:** 2026-10-30T23:15:05.437Z

## Who should check

- Projects that depend on Packagist package phpunit/phpunit (\>= 13.4.0, \< 13.4.4)
- Anyone running sebastianbergmann phpunit \>= 13.4.0, \< 13.4.4

## Description

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.

## Affected and fixed versions

- Packagist `phpunit/phpunit`: affected \>= 13.4.0, \< 13.4.4; fixed 13.4.4 (osv)
- sebastianbergmann phpunit: \>= 13.4.0, \< 13.4.4 (cvelist)

## Mitigation

- Upgrade phpunit/phpunit to 13.4.4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-119193. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-119193.md
Affected: phpunit/phpunit >= 13.4.0, < 13.4.4
Fixed in: 13.4.4

Steps:
1. Search this machine and project for phpunit/phpunit (Packagist), sebastianbergmann phpunit: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-119193 being exploited?

There is no confirmed exploitation: CVE-2026-119193 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.16% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-119193?

Medium: CVSS 5.4 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-119193?

phpunit/phpunit \>= 13.4.0, \< 13.4.4.

### Is there a fix for CVE-2026-119193?

Yes. Fixed in 13.4.4. Upgrade phpunit/phpunit to 13.4.4 or later.

### How do I check if I'm affected by CVE-2026-119193?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-9vw2-f4vp-x7gf>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-119193>
- patch: <https://github.com/sebastianbergmann/phpunit/commit/ae31c78a86e9d6c641497bacf47462d7bb7d7f34>
- other: <https://github.com/sebastianbergmann/phpunit/releases/tag/13.4.4>
- other: <https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2026-119193.yaml>
- other: <https://github.com/sebastianbergmann/phpunit>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-119193>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-9vw2-f4vp-x7gf> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-119193> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-119193>
