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

> Attackers can inject arbitrary PHP INI directives via newlines in forwarded settings, leading to remote code execution in child processes.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 May 2026
- **Updated:** 8 May 2026
- **Also known as:** GHSA-qrr6-mg7r-m243, UBUNTU-CVE-2026-41570

## What is CVE-2026-41570?

CVE-2026-41570 is a high-severity command injection vulnerability in sebastianbergmann phpunit, published on 8 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

Weakness: CWE-93 (Improper Neutralization of CRLF Sequences), CWE-88 (Improper Neutralization of Argument Delimiters in a Command)

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

4 open source packages ship an affected version, including phpunit/phpunit. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `phpunit/phpunit` | Packagist | From 12.5.21 | 12.5.22 |
| `phpunit/phpunit` | Packagist | From 12.5.21 | 12.5.22 |
| `phpunit/phpunit` | Packagist | From 13.1.5 | 13.1.6 |
| `phpunit/phpunit` | Packagist | From 13.1.5 | 13.1.6 |

Products: Phpunit Project Phpunit.

## How do I fix CVE-2026-41570?

Upgrade phpunit/phpunit to a fixed version for your release line: 12.5.22 or 13.1.6.

## Is CVE-2026-41570 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41570 exists.

## Other vulnerabilities in sebastianbergmann phpunit

- [CVE-2013-4744](https://insights.sbomify.com/CVE-2013-4744/): PHPUnit extension for TYPO3 vulnerable to Cross-site Scripting (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41570 and fix it if it is affected.

What it is: CVE-2026-41570 is a high-severity command injection vulnerability in sebastianbergmann phpunit, published on 8 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41570 exists.

Affected packages and fixed versions:
- phpunit/phpunit (Packagist): affected from 12.5.21; fixed in 12.5.22
- phpunit/phpunit (Packagist): affected from 12.5.21; fixed in 12.5.22
- phpunit/phpunit (Packagist): affected from 13.1.5; fixed in 13.1.6
- phpunit/phpunit (Packagist): affected from 13.1.5; fixed in 13.1.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41570/ (Markdown: https://insights.sbomify.com/CVE-2026-41570/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41570
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41570
- OSV: https://osv.dev/vulnerability/CVE-2026-41570

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41570/
Summaries are generated and may contain mistakes; the official description above is the record.
