chore(deps): update dependency phpunit/phpunit to v12.5.22 [security]#404
Merged
renovate[bot] merged 1 commit intomainfrom Apr 18, 2026
Merged
Conversation
18c5e23 to
6731c78
Compare
Minimum allowed line rate is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
12.5.17→12.5.22Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
GHSA-qrr6-mg7r-m243
Impact
PHPUnit forwards PHP INI settings to child processes (used for isolated/PHPT test execution) as
-d name=valuecommand-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. Settingauto_prepend_fileto 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.distini_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 hostphp.ini, or the PHP binary's environment. The most realistic exposure is Poisoned Pipeline Execution (PPE): a pull request from an untrusted contributor that modifiesphpunit.xmlto 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
\nor\ris now rejected with an explicitPhpProcessException. 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 asddtrace'sdatadog.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:
<ini value="…">entry inphpunit.xml/phpunit.xml.distcontains newline,", or;characters, and that nothing writes such values into configuration at build time.pull_request_targetand similar). These mitigations apply to the broader PPE risk class and are effective against this vulnerability as well.phpunit.xml: Treatphpunit.xmlas security-sensitive in code review, particularly<ini>entries.php.inidoes not contain values with embedded newlines or unescaped metacharacters.References
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HRelease Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v12.5.22Compare Source
v12.5.21Compare Source
v12.5.20Compare Source
v12.5.19: PHPUnit 12.5.19Compare Source
Fixed
Learn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
v12.5.18: PHPUnit 12.5.18Compare Source
Fixed
--random-order-seedis used when test execution order is not random--filterdoes not work when filter string starts with#TestSuiteSkippedevent--filter,--group,--testsuite) yields no teststearDown()and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 12.5 in the documentation.
Keep up to date with PHPUnit:
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.