# CVE-2026-41570: PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **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.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-93, CWE-88
- **Aliases:** GHSA-qrr6-mg7r-m243
- **Published:** 2026-04-18T00:59:28.000Z
- **Modified:** 2026-10-26T18:10:00.173Z

## Who should check

- Projects that depend on Packagist package phpunit/phpunit (\>= 12.5.21, \< 12.5.22)
- Anyone running sebastianbergmann phpunit = 12.5.21; = 13.1.5

## Description

PHPUnit is a testing framework for PHP. In versions 12.5.21 and 13.1.5, PHPUnit forwards PHP INI settings to child processes (used for isolated/PHPT test execution) as -d name=value command-line arguments without neutralizing INI metacharacters. Because PHP's INI parser interprets " as a string delimiter, ; as the start of a comment, and most importantly a newline as a directive separator, a value containing a newline is parsed by the child process as multiple INI directives. An attacker able to influence a single INI value can therefore inject arbitrary additional directives into the child's configuration, including auto\_prepend\_file, extension, disable\_functions, open\_basedir, and others. Setting auto\_prepend\_file to an attacker-controlled path yields remote code execution in the child process. This issue has been patched in versions 12.5.22 and 13.1.6.

## Affected and fixed versions

- Packagist `phpunit/phpunit`: affected \>= 12.5.21, \< 12.5.22; fixed 12.5.22, 13.1.6 (osv)
- sebastianbergmann phpunit: = 12.5.21; = 13.1.5 (cvelist)

## Mitigation

- Upgrade phpunit/phpunit to one of 12.5.22, 13.1.6 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-41570.md
Affected: phpunit/phpunit >= 12.5.21, < 12.5.22
Fixed in: 12.5.22, 13.1.6

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-41570 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

phpunit/phpunit \>= 12.5.21, \< 12.5.22.

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

Yes. Fixed in 12.5.22, 13.1.6. Upgrade phpunit/phpunit to one of 12.5.22, 13.1.6 (or later in the same release line).

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

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-qrr6-mg7r-m243>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-41570>
- patch: <https://github.com/sebastianbergmann/phpunit/pull/6592>
- other: <https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2026-41570.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-41570>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-qrr6-mg7r-m243> (license: <https://creativecommons.org/licenses/by/4.0/>)

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