PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-88.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sebastianbergmann | phpunit | = 12.5.21; = 13.1.5 | — | No fix listed | CNA |
| — | phpunit/phpunit (Packagist) | 12.5.21 to before 12.5.22 | 12.5.22 | Patch available | GHSA-qrr6-mg7r-m243 |
| — | phpunit/phpunit (Packagist) | 13.1.5 to before 13.1.6 | 13.1.6 | Patch available | GHSA-qrr6-mg7r-m243 |
- phpunit Vendorsebastianbergmann Affected = 12.5.21; = 13.1.5 Fixed in — No fix listed CNA
- phpunit/phpunit (Packagist) Vendor— Affected 12.5.21 to before 12.5.22 Fixed in 12.5.22 Patch available GHSA-qrr6-mg7r-m243
- phpunit/phpunit (Packagist) Vendor— Affected 13.1.5 to before 13.1.6 Fixed in 13.1.6 Patch available GHSA-qrr6-mg7r-m243
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:phpunit_project:phpunit:12.5.21:*:*:*:*:-:*:* | 12.5.21 | Vulnerable | Phpunit Project |
| cpe:2.3:a:phpunit_project:phpunit:13.1.5:*:*:*:*:-:*:* | 13.1.5 | Vulnerable | Phpunit Project |
- cpe:2.3:a:phpunit_project:phpunit:12.5.21:*:*:*:*:-:*:* Versions 12.5.21 Vulnerable ·Phpunit Project
- cpe:2.3:a:phpunit_project:phpunit:13.1.5:*:*:*:*:-:*:* Versions 13.1.5 Vulnerable ·Phpunit Project
Remediation
- Fix · GHSA-qrr6-mg7r-m243 phpunit/phpunit (Packagist) Fixed in 12.5.22 Advisory →
- Fix · GHSA-qrr6-mg7r-m243 phpunit/phpunit (Packagist) Fixed in 13.1.6 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-41570
- 2026-10-03 Alias added: GHSA-qrr6-mg7r-m243
References
Patch 2
More sebastianbergmann vulnerabilities
- TI-2026-82740 Insecure temporary directory in PHPUnit allows local code execution CVSS 4.0MEDIUM 5.4
Sources
- CVE-2026-41570 · CVE Program
- CVE-2026-41570 · NVD
- FIRST EPSS
- GHSA-qrr6-mg7r-m243 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-41570 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences