USN-9333-1: PHPUnit vulnerability
It was discovered that PHPUnit deserialized code coverage files without validation when running PHPT tests with code coverage enabled. A local attacker able to write files where PHPUnit stores code coverage data could possibly use this issue to execute arbitrary code.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/phpunitto a version that resolves this vulnerability.Fixed in Ubuntu Pro - Upgrade
Upgrade
ubuntu/phpunitto a version that resolves this vulnerability.Fixed in 6.5.5-1ubuntu2+esm1 - Upgrade
Upgrade
ubuntu/phpunitto a version that resolves this vulnerability.Fixed in 8.5.2-1ubuntu1+esm1 - Upgrade
Upgrade
ubuntu/phpunitto a version that resolves this vulnerability.Fixed in 9.5.10-1ubuntu2+esm1 - Upgrade
Upgrade
ubuntu/phpunitto a version that resolves this vulnerability.Fixed in 9.6.17-1ubuntu0.1~esm1
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Systems that run PHPUnit PHPT tests with code coverage enabled are exposed if a local attacker can write files in the location where PHPUnit stores code coverage data.
What access does an attacker need to exploit it?
The attacker needs local file-write access to PHPUnit's code coverage data storage location. The issue occurs when PHPUnit later deserializes those files during PHPT testing with code coverage enabled.
Is a default PHPUnit setup affected?
The issue is specifically tied to running PHPT tests with code coverage enabled. The provided information does not establish that installations not using that testing configuration are affected.
What can be done before patching?
Do not run PHPT tests with code coverage enabled where untrusted local users can write to the code coverage data location. Restrict write permissions to that location to trusted users and processes.