Repository navigation
chore(deps): update dependency phpunit/phpunit to v9.6.33 [security] - #2
renovate-appwrite[bot] wants to merge 2 commits into
Conversation
🟢 Tier S · Ready to mergeThe PR updates PHPUnit from 9.5.21 to 9.6.33, including the PHPT coverage safety fix. It sets PHP 8.0 as Composer's resolution platform and refreshes the lockfile so the test-tooling dependencies remain compatible with the project's declared PHP floor. Latest changes: The newest commit pins Composer's platform to PHP 8.0.0 and regenerates the lockfile, selecting compatible dependency versions and resolving the prior Instantiator PHP requirement mismatch.
Note @renovate-appwrite[bot] does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve. 📂 Walkthrough · 2
✅ Fixed since the last review · 1
Reviewed the commits since |
48e0927 to
9063a12
Compare
The relock pulled doctrine/instantiator 2.1, which needs PHP 8.4, and main already locked Symfony packages that need 8.1, so the declared >=8.0 range did not install. Setting config.platform makes the lock and future Renovate relocks resolve for the bottom of the range.
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
|
@appwrite review |
🟢 Tier S · Ready to mergeThe Composer manifest now resolves dependencies against PHP 8.0, and the lockfile updates PHPUnit to 9.6.33 along with its compatible test dependencies. This brings the locked PHPUnit version past the PHPT coverage deserialization fix.
Note @renovate-appwrite[bot] does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve. 📂 Walkthrough · 2
Reviewed |
This PR contains the following updates:
9.5.21→9.6.33PHPUnit Vulnerable to Unsafe Deserialization in PHPT Code Coverage Handling
CVE-2026-24765 / GHSA-vvj3-c3rp-c85p
More information
Details
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:
Severity
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v9.6.33: PHPUnit 9.6.33Compare 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 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.32: PHPUnit 9.6.32Compare Source
Changed
PHPUnit\Framework\MockObjectexceptions are now subtypes ofPHPUnit\ExceptionLearn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.31: PHPUnit 9.6.31Compare Source
phpunit.pharrebuilt with PHP 8.4 to work around PHP-Scoper issue #1139Learn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.30: PHPUnit 9.6.30Compare Source
Changed
Learn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.29: PHPUnit 9.6.29Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.28: PHPUnit 9.6.28Compare Source
phpunit.pharrebuilt with updated dependenciesLearn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.27: PHPUnit 9.6.27Compare Source
Changed
__sleep()and__wakeup()from test double code generation on PHP >= 8.5Learn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.26: PHPUnit 9.6.26Compare Source
Changed
__serialize()in addition to__sleep()(which will be deprecated in PHP 8.5)Learn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.25Compare Source
v9.6.24: PHPUnit 9.6.24Compare Source
Changed
ReflectionProperty::setAccessible()with PHP >= 8.1SplObjectStoragemethods that will be deprecated in PHP 8.5Learn how to install or update PHPUnit 9.6 in the documentation.
Keep up to date with PHPUnit:
v9.6.23: PHPUnit 9.6.23Compare Source
Changed
E_STRICTconstantHow to install or update PHPUnit
v9.6.22: PHPUnit 9.6.22Compare Source
Fixed
How to install or update PHPUnit
v9.6.21: PHPUnit 9.6.21Compare 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
v9.6.20: PHPUnit 9.6.20Compare Source
Changed
--prefer-lowestCLI option also get recent versions)How to install or update PHPUnit
v9.6.19: PHPUnit 9.6.19Compare Source
Changed
PHPUnitPHARinstead of justPHPUnitfor the PHAR distribution of PHPUnitHow to install or update PHPUnit
v9.6.18: PHPUnit 9.6.18Compare Source
Changed
How to install or update PHPUnit
v9.6.17Compare Source
v9.6.16Compare Source
v9.6.15Compare Source
v9.6.14Compare Source
v9.6.13Compare Source
v9.6.12Compare Source
v9.6.11Compare Source
v9.6.10Compare Source
v9.6.9Compare Source
v9.6.8Compare Source
v9.6.7Compare Source
v9.6.6Compare Source
v9.6.5Compare Source
v9.6.4Compare Source
v9.6.3Compare Source
v9.6.2Compare Source
v9.6.1Compare Source
v9.6.0Compare Source
v9.5.28Compare Source
v9.5.27Compare Source
v9.5.26Compare Source
v9.5.25Compare Source
v9.5.24Compare Source
v9.5.23Compare Source
v9.5.22Compare Source
Configuration
📅 Schedule: (UTC)
🚦 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 has been generated by Mend Renovate CLI.