Phpunit
Monthly
Arbitrary PHP directive injection in PHPUnit 12.5.21 and 13.1.5 enables local attackers with write access to phpunit.xml to achieve code execution in isolated test child processes by embedding newlines in INI setting values. The vulnerability exploits PHPUnit's unsanitized forwarding of INI settings to child processes via command-line arguments, where PHP's INI parser treats newlines as directive separators, allowing injection of auto_prepend_file to load attacker-controlled code. Fixed in versions 12.5.22 and 13.1.6. Primary exposure vector is Poisoned Pipeline Execution (PPE) in CI/CD environments running PHPUnit against untrusted pull requests without isolation.
Unsafe deserialization in PHPUnit versions before 8.5.52, 9.6.33, 10.5.62, 11.5.50, and 12.5.8 allows local attackers to execute arbitrary code by placing malicious serialized objects in `.coverage` files that are deserialized without validation during PHPT test execution. An attacker with file write access can exploit the `cleanupForCoverage()` method's lack of object class restrictions to trigger gadget chains through `__wakeup()` methods. This high-severity vulnerability (CVSS 7.8) affects developers and CI/CD systems running PHPUnit on Linux systems.
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring, as demonstrated by. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, no authentication required, low attack complexity. Actively exploited in the wild (cisa kev) and public exploit code available.
Local code execution against developers running PHPT tests with code coverage in PHPUnit 13.4.0 through 13.4.3, where the framework writes each PHPT job file into a fixed-name phpunit-phpt directory under sys_get_temp_dir() and reuses that directory even if another local user created it first. An attacker holding a local account on the same host can pre-create the directory, wait for a job file to appear, swap in their own code, and have it executed with the developer's privileges when the child process requires the file - while the test still reports OK and the coverage report looks complete. Exploitation requires a shared temporary path (a shared /tmp on Linux/Unix without per-user TMPDIR, systemd PrivateTmp or pam_namespace), the victim actually running PHPT tests with a coverage driver such as PCOV or Xdebug, and winning the timing window; there is no CISA KEV entry and no confirmed active exploitation, though the vendor advisory documents a step-by-step proof-of-concept reproduction.
Cross-site scripting (XSS) vulnerability in the PHPUnit extension before 3.5.15 for TYPO3 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors. Rated medium severity (CVSS 4.3), this vulnerability is remotely exploitable.
Arbitrary PHP directive injection in PHPUnit 12.5.21 and 13.1.5 enables local attackers with write access to phpunit.xml to achieve code execution in isolated test child processes by embedding newlines in INI setting values. The vulnerability exploits PHPUnit's unsanitized forwarding of INI settings to child processes via command-line arguments, where PHP's INI parser treats newlines as directive separators, allowing injection of auto_prepend_file to load attacker-controlled code. Fixed in versions 12.5.22 and 13.1.6. Primary exposure vector is Poisoned Pipeline Execution (PPE) in CI/CD environments running PHPUnit against untrusted pull requests without isolation.
Unsafe deserialization in PHPUnit versions before 8.5.52, 9.6.33, 10.5.62, 11.5.50, and 12.5.8 allows local attackers to execute arbitrary code by placing malicious serialized objects in `.coverage` files that are deserialized without validation during PHPT test execution. An attacker with file write access can exploit the `cleanupForCoverage()` method's lack of object class restrictions to trigger gadget chains through `__wakeup()` methods. This high-severity vulnerability (CVSS 7.8) affects developers and CI/CD systems running PHPUnit on Linux systems.
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a "<?php " substring, as demonstrated by. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, no authentication required, low attack complexity. Actively exploited in the wild (cisa kev) and public exploit code available.
Local code execution against developers running PHPT tests with code coverage in PHPUnit 13.4.0 through 13.4.3, where the framework writes each PHPT job file into a fixed-name phpunit-phpt directory under sys_get_temp_dir() and reuses that directory even if another local user created it first. An attacker holding a local account on the same host can pre-create the directory, wait for a job file to appear, swap in their own code, and have it executed with the developer's privileges when the child process requires the file - while the test still reports OK and the coverage report looks complete. Exploitation requires a shared temporary path (a shared /tmp on Linux/Unix without per-user TMPDIR, systemd PrivateTmp or pam_namespace), the victim actually running PHPT tests with a coverage driver such as PCOV or Xdebug, and winning the timing window; there is no CISA KEV entry and no confirmed active exploitation, though the vendor advisory documents a step-by-step proof-of-concept reproduction.
Cross-site scripting (XSS) vulnerability in the PHPUnit extension before 3.5.15 for TYPO3 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors. Rated medium severity (CVSS 4.3), this vulnerability is remotely exploitable.