Update dependency phpunit/phpunit to v8 [SECURITY] #29
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:
^6 || ^7→^6 || ^7 || ^8GitHub Vulnerability Alerts
CVE-2026-24765
Overview
A vulnerability has been discovered involving unsafe deserialization of code coverage data in PHPT test execution. The vulnerability exists in the
cleanupForCoverage()method, which deserializes code coverage files without validation, potentially allowing remote code execution if malicious.coveragefiles are present prior to the execution of the PHPT test.Technical Details
Affected Component: PHPT test runner, method
cleanupForCoverage()Affected Versions: <= 8.5.51, <= 9.6.32, <= 10.5.61, <= 11.5.49, <= 12.5.7
Vulnerable Code Pattern
The vulnerability occurs when a
.coveragefile, which should not exist before test execution, is deserialized without theallowed_classesparameter restriction. An attacker with local file write access can place a malicious serialized object with a__wakeup()method into the file system, leading to arbitrary code execution during test runs with code coverage instrumentation enabled.Attack Prerequisites and Constraints
This vulnerability requires local file write access to the location where PHPUnit stores or expects code coverage files for PHPT tests. This can occur through:
.coveragefile alongside test files, executed when the CI system runs tests using PHPUnit and collects code coverage informationCritical Context: Running test suites from unreviewed pull requests without isolated execution is inherently a code execution risk, independent of this specific vulnerability. This represents a broader class of Poisoned Pipeline Execution (PPE) attacks affecting CI/CD systems.
Proposed Remediation Approach
Rather than just silently sanitizing the input via
['allowed_classes' => false], the maintainer has chosen to make the anomalous state explicit by treating pre-existing.coveragefiles for PHPT tests as an error condition.Rationale for Error-Based Approach:
.coveragefile existing before test execution), the error must be visible in CI/CD output, alerting operators to investigate the root cause rather than proceeding with sanitized input.coveragefile should never exist before tests run, coverage data is generated by executing tests, not sourced from artifacts. Its presence indicates:Severity Classification
Mitigating Factors (Environmental Context)
Organizations can reduce the effective risk of this vulnerability through proper CI/CD configuration:
Fixed Behaviour
When a
.coveragefile is detected for a PHPT test prior to execution, PHPUnit will emit a clear error message identifying the anomalous state. This ensures:Recommendation
Update to the patched version immediately if a project runs PHPT tests using PHPUnit with coverage instrumentation in any CI/CD environment that executes code from external contributors. Additionally, audit the project's CI/CD configuration to ensure:
Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v8.5.52: PHPUnit 8.5.52Compare Source
Changed
.coveragefiles in pull requests, a PHPT test will no longer be run if the temporary file for writing code coverage information already exists before the test runsLearn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.51: PHPUnit 8.5.51Compare Source
Changed
PHPUnit\Framework\MockObjectexceptions subtypes ofPHPUnit\ExceptionLearn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.50: PHPUnit 8.5.50Compare Source
phpunit.pharrebuilt with PHP 8.4 to work around PHP-Scoper issue #1139Learn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.49: PHPUnit 8.5.49Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.48: PHPUnit 8.5.48Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.47: PHPUnit 8.5.47Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.46: PHPUnit 8.5.46Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.45: PHPUnit 8.5.45Compare Source
Changed
__serialize()in addition to__sleep()(which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.44Compare Source
v8.5.43: PHPUnit 8.5.43Compare Source
Changed
ReflectionProperty::setAccessible()with PHP >= 8.1SplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 8.5 in the documentation.
Keep up to date with PHPUnit:
v8.5.42: PHPUnit 8.5.42Compare Source
Changed
E_STRICTconstantHow to install or update PHPUnit
v8.5.41: PHPUnit 8.5.41Compare Source
Fixed
How to install or update PHPUnit
v8.5.40: PHPUnit 8.5.40Compare Source
Changed
E_STRICTconstant in PHP 8.4.phpstorm.meta.phpfile as methods such asTestCase::createStub()use generics / template types for their return types and PhpStorm, for example, uses that informationHow to install or update PHPUnit
v8.5.39: PHPUnit 8.5.39Compare Source
Changed
--prefer-lowestCLI option also get recent versions)How to install or update PHPUnit
v8.5.38: PHPUnit 8.5.38Compare Source
Changed
PHPUnitPHARinstead of justPHPUnitfor the PHAR distribution of PHPUnitHow to install or update PHPUnit
v8.5.37Compare Source
v8.5.36Compare Source
v8.5.35Compare Source
v8.5.34Compare Source
v8.5.33Compare Source
v8.5.32Compare Source
v8.5.31Compare Source
v8.5.30Compare Source
v8.5.29Compare Source
v8.5.28Compare Source
v8.5.27Compare Source
v8.5.26Compare Source
v8.5.25Compare Source
v8.5.24Compare Source
v8.5.23Compare Source
v8.5.22Compare Source
v8.5.21Compare Source
v8.5.20Compare Source
v8.5.19Compare Source
v8.5.18Compare Source
v8.5.17Compare Source
v8.5.16Compare Source
v8.5.15Compare Source
v8.5.14Compare Source
v8.5.13Compare Source
v8.5.12Compare Source
v8.5.11Compare Source
v8.5.10Compare Source
v8.5.9Compare Source
v8.5.8Compare Source
v8.5.7Compare Source
v8.5.6Compare Source
v8.5.5Compare Source
v8.5.4Compare Source
v8.5.3Compare Source
v8.5.2Compare Source
v8.5.1Compare Source
v8.5.0Compare Source
v8.4.3Compare Source
v8.4.2Compare Source
v8.4.1Compare Source
v8.4.0Compare Source
v8.3.5Compare Source
v8.3.4Compare Source
v8.3.3Compare Source
v8.3.2Compare Source
v8.3.1Compare Source
v8.3.0Compare Source
v8.2.5Compare Source
v8.2.4Compare Source
v8.2.3Compare Source
v8.2.2Compare Source
v8.2.1Compare Source
v8.2.0Compare Source
v8.1.6Compare Source
v8.1.5Compare Source
v8.1.4Compare Source
v8.1.3Compare Source
v8.1.2Compare Source
v8.1.1Compare Source
v8.1.0Compare Source
v8.0.6Compare Source
v8.0.5Compare Source
v8.0.4Compare Source
v8.0.3Compare Source
v8.0.2Compare Source
v8.0.1Compare Source
v8.0.0Compare Source
v7.5.20Compare Source
v7.5.19Compare Source
v7.5.18Compare Source
v7.5.17Compare Source
v7.5.16Compare Source
v7.5.15Compare Source
v7.5.14Compare Source
v7.5.13Compare Source
v7.5.12Compare Source
v7.5.11Compare Source
v7.5.10Compare Source
v7.5.9Compare Source
v7.5.8Compare Source
v7.5.7Compare Source
v7.5.6Compare Source
v7.5.5Compare Source
v7.5.4Compare Source
v7.5.3Compare Source
v7.5.2Compare Source
v7.5.1Compare Source
v7.5.0Compare Source
v7.4.5Compare Source
v7.4.4Compare Source
v7.4.3Compare Source
v7.4.2Compare Source
v7.4.1Compare Source
v7.4.0Compare Source
v7.3.5Compare Source
v7.3.4Compare Source
v7.3.3Compare Source
v7.3.2Compare Source
v7.3.1Compare Source
v7.3.0Compare Source
v7.2.7Compare Source
v7.2.6Compare Source
v7.2.5Compare Source
v7.2.4Compare Source
v7.2.3Compare Source
v7.2.2Compare Source
v7.2.1Compare Source
v7.2.0Compare Source
v7.1.5Compare Source
v7.1.4Compare Source
v7.1.3Compare Source
v7.1.2Compare Source
v7.1.1Compare Source
v7.1.0Compare Source
v7.0.3Compare Source
v7.0.2Compare Source
v7.0.1Compare Source
v7.0.0Compare Source
v6.5.14Compare Source
v6.5.13Compare Source
v6.5.12Compare Source
v6.5.11Compare Source
v6.5.10Compare Source
v6.5.9Compare Source
v6.5.8Compare Source
v6.5.7Compare Source
v6.5.6Compare Source
v6.5.5Compare Source
v6.5.4Compare Source
v6.5.3Compare Source
v6.5.2Compare Source
v6.5.1Compare Source
v6.5.0Compare Source
v6.4.4Compare Source
v6.4.3Compare Source
v6.4.2Compare Source
v6.4.1Compare Source
v6.4.0Compare Source
v6.3.1Compare Source
v6.3.0Compare Source
v6.2.4Compare Source
v6.2.3Compare Source
v6.2.2Compare Source
v6.2.1Compare Source
v6.2.0Compare Source
v6.1.4Compare Source
v6.1.3Compare Source
v6.1.2Compare Source
v6.1.1Compare Source
v6.1.0Compare Source
v6.0.13Compare Source
v6.0.12Compare Source
v6.0.11Compare Source
v6.0.10Compare Source
v6.0.9Compare Source
v6.0.8Compare Source
v6.0.7Compare Source
v6.0.6Compare Source
v6.0.5Compare Source
v6.0.4Compare Source
v6.0.3Compare Source
v6.0.2Compare Source
v6.0.1Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.