CVE-2026-41570 Details
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.
A vulnerability exists in PHPUnit versions 12.5.21 and 13.1.5, where the framework forwards PHP INI settings to child processes as command-line arguments without properly escaping INI metacharacters. This oversight allows an attacker to inject additional INI directives by including newlines in the INI values. Exploitation of this vulnerability could lead to remote code execution in the child process by manipulating certain INI settings. The issue has been patched in PHPUnit versions 12.5.22 and 13.1.6.
Users can upgrade to PHPUnit versions 12.5.22 or 13.1.6 to address this vulnerability. If an immediate upgrade is not possible, it is recommended to audit INI values for newline or metacharacter content, isolate CI execution of untrusted code, restrict modifications to the 'phpunit.xml' file, and sanitize the host PHP 'php.ini' to remove problematic values.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/sebastianbergmann/phpunit/pull/6592 | CISA-ADP | Issue TrackingPatch |
| https://github.com/sebastianbergmann/phpunit/pull/6592 | [email protected] | Issue TrackingPatch |
| https://github.com/sebastianbergmann/phpunit/security/advisories/GHSA-qrr6-mg7r-m243 | [email protected] | MitigationPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-88 | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | [email protected] |
| CWE-93 | Improper Neutralization of CRLF Sequences ('CRLF Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| phpunit project phpunit | 12.5.21 13.1.5 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 8, 2026 | Initial Analysis | [email protected] |
| May 8, 2026 | CVE Modified | CISA-ADP |
| May 8, 2026 | New CVE Received | [email protected] |