CVEssebastianbergmannCVE-2026-41570Published May 8, 14:33 · Updated May 8, 16:01 UTC
7.8
HighCVSS 3.1 · from GitHub_M
CVE-2026-41570

PHPUnit: Argument injection via newline in PHP INI values forwarded to child processes

phpunit · CWE-93 · CWE-93
Affectedphpunit
FixNo fix listed yet.
PublishedMay 8, 14:33 · GitHub_M
ScoredMay 8 · 7.8 · GitHub_M
Exploit code publicNone known · checked 21:18 UTC
ExploitedNone known · CISA KEV checked 22:11 UTC

What we know

No known exploitation. CISA KEV, checked 22:11 UTC.
No public exploit code known. Exploit-DB, Metasploit, Nuclei, checked 21:18 UTC.
An attacker needs local access to the machine. CVSS: local.
A successful attack can read and change data and take the service down. CVSS: high impact on confidentiality, integrity and availability.
A successful attack gives full control of the affected system. CISA: technical impact total.

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.

From GitHub_M

Affected and fixed versions

ProductAffectedFixed inphpunit= 12.5.21–phpunit= 13.1.5–

Exploit code

Exploit-DBnone knownMetasploitnone knownNucleinone known

References

github.com/sebastianbergmann/phpunit/security/advisories/GHSA-qrr6-mg7r-m243 · github.comrefsource_CONFIRMgithub.com/sebastianbergmann/phpunit/pull/6592 · github.comrefsource_MISC

Other CVEs in phpunit

All 2 →
5.4PHPUnit vulnerable to code execution by other local users via shared temporary directory in PHPT code coverage handling · CVE-2026-119193Oct 297.8PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling · CVE-2026-24765Jan 27