USN-9333-1: PHPUnit vulnerability

Published Dec 1, 2026
·
Updated

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

12 affected componentsFixes available
All of the following
ubuntu/phpunit<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=24.04
All of the following
ubuntu/phpunit<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=22.04
All of the following
ubuntu/phpunit<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=20.04
All of the following
ubuntu/phpunit<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=18.04
ubuntu/phpunit<6.5.5-1ubuntu2+esm1
6.5.5-1ubuntu2+esm1
ubuntu/phpunit<8.5.2-1ubuntu1+esm1
8.5.2-1ubuntu1+esm1
ubuntu/phpunit<9.5.10-1ubuntu2+esm1
9.5.10-1ubuntu2+esm1
ubuntu/phpunit<9.6.17-1ubuntu0.1~esm1
9.6.17-1ubuntu0.1~esm1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/phpunit to a version that resolves this vulnerability.

    Fixed in Ubuntu Pro
  2. Upgrade

    Upgrade ubuntu/phpunit to a version that resolves this vulnerability.

    Fixed in 6.5.5-1ubuntu2+esm1
  3. Upgrade

    Upgrade ubuntu/phpunit to a version that resolves this vulnerability.

    Fixed in 8.5.2-1ubuntu1+esm1
  4. Upgrade

    Upgrade ubuntu/phpunit to a version that resolves this vulnerability.

    Fixed in 9.5.10-1ubuntu2+esm1
  5. Upgrade

    Upgrade ubuntu/phpunit to a version that resolves this vulnerability.

    Fixed in 9.6.17-1ubuntu0.1~esm1

Event History

Dec 1, 2026
Advisory Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
DescriptionAffected Software
Advisory Published
via OSV·05:21 PM
Data Sourced
via OSV·05:21 PM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203