GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — Update dependency phpunit/phpunit to v13.1.6 [SECURITY] by renovate[bot] · Pull Request #538 · dauxio/daux.io Conversation
|
| Package | Change | Age | Confidence |
|---|---|---|---|
| phpunit/phpunit (source) | 13.0.5 → 13.1.6 |
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.distini_get_all()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.
PHPUnit\Util\PHP\JobRunner::settingsToParameters().
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.
If upgrading is not immediately possible:
<ini value="…"> entry in phpunit.xml / phpunit.xml.dist contains newline, ", or ; characters, and that nothing writes such values into configuration at build time.pull_request_target and similar). These mitigations apply to the broader PPE risk class and are effective against this vulnerability as well.phpunit.xml: Treat phpunit.xml as security-sensitive in code review, particularly <ini> entries.php.ini does not contain values with embedded newlines or unescaped metacharacters.CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hv13.1.6: PHPUnit 13.1.6; and " are not preserved when forwarding settings to child processesLearn how to install or update PHPUnit 13.1 in the documentation.
v13.1.5: PHPUnit 13.1.5-d settings are not forwarded to child processes for process isolationRequiresPhp (e.g. <=8.5) is compared against full PHP version, causing unexpected skipsdataSetAsStringWithData() raises "float is not representable as int" warning for large floats in data setsLearn how to install or update PHPUnit 13.1 in the documentation.
v13.1.4: PHPUnit 13.1.4DefaultJobRunner deadlocks on child processes that write large amounts of stderr output$_SERVER entries leak from parent into child processfailOnEmptyTestSuite="false" in phpunit.xml is ignored when --group/--filter/--testsuite matches no testsLearn how to install or update PHPUnit 13.1 in the documentation.
v13.1.3: PHPUnit 13.1.3Learn how to install or update PHPUnit 13.1 in the documentation.
v13.1.2: PHPUnit 13.1.2--random-order-seed is used when test execution order is not random--filter does not work when filter string starts with #TestSuiteSkipped event--filter, --group, --testsuite) yields no teststearDown() and handler restoration, causing subsequent tests to be marked as riskyLearn how to install or update PHPUnit 13.1 in the documentation.
v13.1.1: PHPUnit 13.1.1exit was called from some testcolors="true" in XML configuration file does not unconditionally enable colored output--migrate-configuration does not update schema location when XML content already validates against current schemawillReturnCallback() is silently swallowed when code under test catches exceptionsset_include_path()TestDoubleBuilder method chainingLearn how to install or update PHPUnit 13.1 in the documentation.
v13.1.0: PHPUnit 13.1.0includeInCodeCoverage attribute for <directory> and <file> children of <source>#[Group] information in Open Test Reporting (OTR) XML logfile#[DataProviderClosure] for static closures<issueTriggerResolvers> in the XML configuration file%r...%r in EXPECTF sectionoutputDirectory attribute, allowing the output directory to be specified later with the --coverage-html CLI optionStringMatchesFormatDescription constraint which is used by assertFileMatchesFormat(), assertFileMatchesFormatFile(), assertStringMatchesFormat(), assertStringMatchesFormatFile(), and EXPECTF sections of PHPT test filesPHPUnit\Runner\Extension\Facade from a concrete class to an interface and introduced an internal ExtensionFacade implementation, so that extensions only depend on the Facade interface while PHPUnit internally uses the ExtensionFacade class that also provides query methods--log-events-verbose-text <file> CLI optionid() and after() for mock object expectationsFILE_EXTERNAL breaks __DIR__TestSuiteLoader is brittle and causes "Class FooTest not found" even for valid tests in valid filenamesLearn how to install or update PHPUnit 13.1 in the documentation.
v13.0.6: PHPUnit 13.0.6RegularExpression and StringMatchesFormatDescription did not handle preg_match() errors such as Compilation failed: regular expression is too largeLearn how to install or update PHPUnit 13.0 in the documentation.
📅 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
0590f30 to
395ff4c
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.