GHSA-qrr6-mg7r-m243 is a high-severity (CVSS 7.8) CWE-88 vulnerability in phpunit/phpunit. A fix is available for phpunit/phpunit — see the affected versions and patch details below.
PHPUnit has Argument injection via newline in PHP INI values that are forwarded to child processes
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-qrr6-mg7r-m243.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-qrr6-mg7r-m243 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 379,145 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
phpunit/phpunit🐘phpunit/phpunitReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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 inphpunit.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 (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 rejected with an explicit PhpProcessException. This follows the same "visibility over silence" principle applied in CVE-2026-24765: the anomalous state fails loudly in CI output rather than being silently sanitized, giving operators an opportunity to investigate whether it reflects tampering, environment contamination, or an unexpected upstream change.
2. Quote remaining metacharacters
Values containing " or ;, both of which have legitimate uses (e.g., regex-valued INI settings such as ddtrace's datadog.appsec.obfuscation_parameter_value_regexp), are wrapped in double quotes with inner " escaped as \", so PHP's INI parser reads them as literal string contents rather than comment/delimiter tokens. Plain values are forwarded unchanged so that boolean keywords (On/Off) and bitwise expressions (E_ALL & ~E_NOTICE) retain their INI semantics.
Workarounds
If upgrading is not immediately possible:
- Audit INI values: Ensure no
<ini value="…">entry inphpunit.xml/phpunit.xml.distcontains newline,", or;characters, and that nothing writes such values into configuration at build time. - Isolate CI execution of untrusted code: Run PHPUnit against pull requests only in ephemeral, containerized runners that discard filesystem state between jobs; require human review before executing PRs from forks; enforce branch protection on workflows that handle secrets (
pull_request_targetand similar). These mitigations apply to the broader PPE risk class and are effective against this vulnerability as well. - Restrict who can modify
phpunit.xml: Treatphpunit.xmlas security-sensitive in code review, particularly<ini>entries. - Sanitize host INI: Ensure the host PHP's
php.inidoes not contain values with embedded newlines or unescaped metacharacters.
References
- Fix: https://github.com/sebastianbergmann/phpunit/pull/6592
- Related advisory (same threat class, Poisoned Pipeline Execution): GHSA-vvj3-c3rp-c85p / CVE-2026-24765
- OWASP CI/CD Top 10: CICD-SEC-04 Poisoned Pipeline Execution
- CWE-88: https://cwe.mitre.org/data/definitions/88.html
- CWE-93: https://cwe.mitre.org/data/definitions/93.html
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | phpunit/phpunit | ≥ 12.5.21&&< 12.5.22 | 12.5.22composer require phpunit/phpunit:^12.5.22 |
| 🐘Packagist | phpunit/phpunit | ≥ 13.1.5&&< 13.1.6 | 13.1.6composer require phpunit/phpunit:^13.1.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpunit/phpunit, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update phpunit/phpunit to 12.5.22 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qrr6-mg7r-m243 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-qrr6-mg7r-m243 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-qrr6-mg7r-m243. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-qrr6-mg7r-m243 in your dependencies?
O3 Security finds GHSA-qrr6-mg7r-m243 across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.