highCVSS 7.8Vulnerability

GHSA-qrr6-mg7r-m243

## Impact 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. Sources of INI values that participate in the attack: - `<ini name="…" value="…"/>` entries in `phpunit.xml` / `phpunit.xml.dist` - INI settings inherited from the host PHP runtime via `ini_get_all()` ### Threat Model Exploitation requires the attacker to control the content of an INI value read by PHPUnit. In practice this means write access to the project's `phpunit.xml`, the host `php.ini`, or the PHP binary's environment. The most realistic exposure is [Poisoned Pipeline Execution](https://owasp.org/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution) (PPE): a pull request from an untrusted contributor that modifies `phpunit.xml` to include a newline-containing INI value, executed by a CI system that runs PHPUnit against the PR without isolation. A malicious newline is not visibly distinguishable from a legitimate value in a typical diff review. ### Affected component `PHPUnit\Util\PHP\JobRunner::settingsToParameters()`. ## Patches The fix has two parts: **1. Reject line-break characters** Because a newline or carriage return in an INI value has no legitimate use and is the primitive that enables directive injection, any PHP setting value containing `\n` or `\r` is now reject

Properties

ghsa_id
GHSA-qrr6-mg7r-m243
summary
PHPUnit has Argument injection via newline in PHP INI values that are forwarded to child processes
severity
high
cvss_score
7.8
cve_id
GHSA-qrr6-mg7r-m243
cvss_vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
is_ghsa_only
true
ghsa_published
2026-04-18T00:59:28Z
source_url
https://github.com/advisories/GHSA-qrr6-mg7r-m243
ghsa_updated
2026-04-20T18:58:43Z

Related Entities (5)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]composer/phpunit/phpunit

AFFECTS (1)

[Software]composer/phpunit/phpunit

HAS_WEAKNESS (2)

[Weakness]Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
[Weakness]Improper Neutralization of CRLF Sequences ('CRLF Injection')

Explore deeper with Ninja Signal's threat intelligence graph