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

Source: https://junglewise.ai/threats/cve-2026-41570-phpunit-has-argument-injection-via-newline-in-php-ini-values-that  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-08. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2026-41570 · Severity: high · CVSS 7.8 · Published 2026-05-08

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.

Technologies: [phpunit/phpunit (Packagist)](https://junglewise.ai/threats/technologies/phpunit-phpunit). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-41570 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41570 being exploited in the wild.

**How severe is CVE-2026-41570?** High severity, with a CVSS score of 7.8, published 8 May 2026.

**Which products and versions are affected?** phpunit/phpunit (Packagist) ECOSYSTEM:introduced=12.5.21,fixed=12.5.22.

**Is there a fix for CVE-2026-41570?** Yes. phpunit/phpunit (Packagist): upgrade to 12.5.22 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-41570?** Check whether you run phpunit/phpunit (Packagist) or Phpunit Project Phpunit at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- phpunit/phpunit (Packagist): upgrade to 12.5.22 or later

  ```sh
  composer require phpunit/phpunit:^12.5.22
  ```


## Affected products

- phpunit/phpunit (Packagist) ECOSYSTEM:introduced=12.5.21,fixed=12.5.22
- Phpunit Project Phpunit

## Identifiers

- CVE-2026-41570
- GHSA-qrr6-mg7r-m243

## References

- [https://api.github.com/users/kayw-geek](https://api.github.com/users/kayw-geek)
- [https://github.com/kayw-geek](https://github.com/kayw-geek)
- [https://api.github.com/users/kayw-geek/gists%7B/gist_id%7D](https://api.github.com/users/kayw-geek/gists%7B/gist_id%7D)
- [https://api.github.com/users/kayw-geek/repos](https://api.github.com/users/kayw-geek/repos)
- [https://avatars.githubusercontent.com/u/29700073?v=4](https://avatars.githubusercontent.com/u/29700073?v=4)
- [https://api.github.com/users/kayw-geek/events%7B/privacy%7D](https://api.github.com/users/kayw-geek/events%7B/privacy%7D)

## Related threats

- [PHPUnit predictable temp directory in code coverage for PHPT tests](https://junglewise.ai/threats/cve-2026-119193-phpunit-is-a-testing-framework-for-php-from-13-4-0-until-13-4-4)
- [PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling](https://junglewise.ai/threats/cve-2026-24765-phpunit-vulnerable-to-unsafe-deserialization-in-phpt-code)
- [Code Injection in PHPUnit](https://junglewise.ai/threats/cve-2017-9841-phpunit-command-injection-vulnerability)
