Skip to content

chore(deps): update dependency phpunit/phpunit to v12.5.22 [security]#404

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/packagist-phpunit-phpunit-vulnerability
Apr 18, 2026
Merged

chore(deps): update dependency phpunit/phpunit to v12.5.22 [security]#404
renovate[bot] merged 1 commit intomainfrom
renovate/packagist-phpunit-phpunit-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 18, 2026

This PR contains the following updates:

Package Change Age Confidence
phpunit/phpunit (source) 12.5.1712.5.22 age confidence

Warning

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=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 (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 in phpunit.xml / phpunit.xml.dist contains 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_target and similar). These mitigations apply to the broader PPE risk class and are effective against this vulnerability as well.
  • Restrict who can modify phpunit.xml: Treat phpunit.xml as security-sensitive in code review, particularly <ini> entries.
  • Sanitize host INI: Ensure the host PHP's php.ini does not contain values with embedded newlines or unescaped metacharacters.

References

Severity
  • CVSS Score: 7.8 / 10 (High)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Release Notes

sebastianbergmann/phpunit (phpunit/phpunit)

v12.5.22

Compare Source

v12.5.21

Compare Source

v12.5.20

Compare Source

v12.5.19: PHPUnit 12.5.19

Compare Source

Fixed
  • Regression in XML configuration migration introduced in PHPUnit 12.5.8

Learn how to install or update PHPUnit 12.5 in the documentation.

Keep up to date with PHPUnit:

v12.5.18: PHPUnit 12.5.18

Compare Source

Fixed
  • #​4571: No warning when --random-order-seed is used when test execution order is not random
  • #​4975: --filter does not work when filter string starts with #
  • #​5354: JUnit XML logger does not handle TestSuiteSkipped event
  • #​6276: Exit with non-zero exit code when explicit test selection (--filter, --group, --testsuite) yields no tests
  • #​6583: Failing output expectation skips tearDown() and handler restoration, causing subsequent tests to be marked as risky

Learn how to install or update PHPUnit 12.5 in the documentation.

Keep up to date with PHPUnit:

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/packagist-phpunit-phpunit-vulnerability branch from 18c5e23 to 6731c78 Compare April 18, 2026 08:47
@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Complexity Health
Command/AliasAddCommand.php 93% 12
Command/DKIMDisableCommand.php 96% 6
Command/DKIMSetupCommand.php 95% 16
Command/DomainAddCommand.php 94% 6
Command/FetchmailAccountAddCommand.php 93% 9
Command/InitSetupCommand.php 100% 13
Command/RedisSyncCommand.php 90% 4
Command/SystemCheckCommand.php 94% 24
Command/Trait/ConnectionCheckTrait.php 73% 3
Command/UserAddCommand.php 80% 11
Command/VersionCheckCommand.php 100% 13
Controller/Admin/AliasCrudController.php 79% 11
Controller/Admin/DKIMCrudController.php 100% 6
Controller/Admin/DashboardController.php 97% 10
Controller/Admin/DnsWizardAction.php 94% 7
Controller/Admin/DomainCrudController.php 100% 5
Controller/Admin/Observability/DovecotStatsController.php 100% 22
Controller/Admin/Observability/RspamdStatsController.php 98% 11
Controller/Admin/UserCrudController.php 81% 18
Controller/Autoconfig/AutoconfigAction.php 100% 4
Controller/Autoconfig/AutodiscoverAction.php 100% 4
Controller/Security/LoginAction.php 100% 3
Controller/Security/LogoutAction.php 100% 1
Controller/User/ChangePasswordAction.php 96% 6
Controller/User/FetchmailAccountController.php 70% 16
Controller/User/MobileConfigAction.php 67% 4
DependencyInjection/Compiler/AppSecretGeneratorCompilerPass.php 100% 7
Entity/Alias.php 100% 9
Entity/DkimInfoTrait.php 100% 6
Entity/Domain.php 100% 13
Entity/FetchmailAccount.php 100% 17
Entity/User.php 88% 30
Exception/DKIM/DomainKeyNotFoundException.php 0% 0
Exception/DomainNotFoundException.php 100% 1
Exception/Dovecot/DoveadmAuthenticationException.php 0% 0
Exception/Dovecot/DoveadmConnectionException.php 0% 0
Exception/Dovecot/DoveadmException.php 0% 0
Exception/Dovecot/DoveadmResponseException.php 0% 0
Factory/UserFactory.php 100% 5
Form/Type/ChangePasswordType.php 100% 2
Form/Type/OAuthRegisterType.php 100% 2
Kernel.php 0% 1
Repository/AliasRepository.php 100% 1
Repository/DomainRepository.php 100% 1
Repository/FetchmailAccountRepository.php 100% 1
Repository/UserRepository.php 85% 4
Service/ApplicationVersionService.php 100% 8
Service/ConnectionCheckService.php 100% 28
Service/DKIM/Config/Manager.php 100% 2
Service/DKIM/Config/MapGenerator.php 100% 7
Service/DKIM/DKIMStatus.php 100% 5
Service/DKIM/DKIMStatusService.php 100% 7
Service/DKIM/DomainKeyReaderService.php 100% 4
Service/DKIM/FormatterService.php 100% 1
Service/DKIM/KeyGenerationService.php 100% 3
Service/DKIM/KeyPair.php 100% 3
Service/DKIM/RuntimeDataLoader.php 100% 3
Service/DnsWizard/Check/ARecordCheck.php 100% 10
Service/DnsWizard/Check/AaaaRecordCheck.php 100% 10
Service/DnsWizard/Check/AutodiscoveryRecordCheck.php 100% 28
Service/DnsWizard/Check/DkimRecordCheck.php 100% 8
Service/DnsWizard/Check/DmarcRecordCheck.php 100% 10
Service/DnsWizard/Check/DnsCheckInterface.php 0% 0
Service/DnsWizard/Check/MxRecordCheck.php 100% 10
Service/DnsWizard/Check/PtrRecordCheck.php 100% 8
Service/DnsWizard/Check/SpfRecordCheck.php 100% 10
Service/DnsWizard/DnsLookupInterface.php 0% 0
Service/DnsWizard/DnsWizardRow.php 100% 1
Service/DnsWizard/DnsWizardStatus.php 0% 0
Service/DnsWizard/DnsWizardValidator.php 100% 6
Service/DnsWizard/ExpectedHostIps.php 100% 2
Service/DnsWizard/HostIpResolver.php 98% 17
Service/DnsWizard/NativeDnsLookup.php 70% 44
Service/DnsWizard/Scopes.php 0% 1
Service/Dovecot/DTO/DoveadmHealthDto.php 100% 7
Service/Dovecot/DTO/HealthStatus.php 0% 0
Service/Dovecot/DTO/RateSeriesDto.php 100% 9
Service/Dovecot/DTO/StatsDumpDto.php 67% 9
Service/Dovecot/DoveadmHttpClient.php 81% 76
Service/Dovecot/DovecotChartFactory.php 99% 9
Service/Dovecot/DovecotRateCalculator.php 100% 21
Service/Dovecot/DovecotStatsSampler.php 97% 17
Service/FetchmailAccount/AccountData.php 100% 1
Service/FetchmailAccount/AccountWriter.php 75% 4
Service/FetchmailAccount/RedisKeys.php 75% 4
Service/FetchmailAccount/RuntimeData.php 0% 0
Service/FetchmailAccount/RuntimeDataLoader.php 100% 4
Service/GitHubTagService.php 100% 8
Service/MobileConfig/MobileConfigService.php 89% 14
Service/Rspamd/DTO/ActionDistributionDto.php 91% 9
Service/Rspamd/DTO/ActionThresholdDto.php 100% 1
Service/Rspamd/DTO/HealthDto.php 100% 7
Service/Rspamd/DTO/HistoryRowDto.php 100% 1
Service/Rspamd/DTO/KpiValueDto.php 14% 7
Service/Rspamd/DTO/RspamdSummaryDto.php 100% 1
Service/Rspamd/DTO/SymbolCounterDto.php 100% 1
Service/Rspamd/DTO/TimeSeriesDto.php 100% 5
Service/Rspamd/RspamdChartFactory.php 96% 24
Service/Rspamd/RspamdClientException.php 100% 5
Service/Rspamd/RspamdConstants.php 0% 1
Service/Rspamd/RspamdControllerClient.php 94% 33
Service/Rspamd/RspamdStatsService.php 87% 117
Service/Security/Roles.php 0% 1
Service/Security/User/OAuth/AccountConnector.php 100% 3
Service/Security/User/OAuth/DenyRegistrationSubscriber.php 100% 5
Service/Security/User/OAuth/RegistrationFormHandler.php 100% 6
Service/Security/User/OAuth/UserProvider.php 100% 18
Service/Security/Voter/DomainAdminVoter.php 100% 10
Service/Security/Voter/FetchmailAccountVoter.php 100% 8
Service/UserChangeListener.php 100% 5
Subscriber/DKIM/ConfigSyncSubscriber.php 100% 5
Subscriber/DKIM/CreatePrivateKeyOnActivationSubscriber.php 92% 8
Twig/VersionExtension.php 100% 9
Validator/DomainName.php 100% 1
Validator/DomainNameValidator.php 74% 12
Summary 92% (2841 / 3077) 1067

Minimum allowed line rate is 60%

@renovate renovate Bot merged commit c7d7893 into main Apr 18, 2026
4 checks passed
@renovate renovate Bot deleted the renovate/packagist-phpunit-phpunit-vulnerability branch April 18, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants