Updated 27 Nov 2026: 19 Nov PHPUnit 13.4.8 fixes JUnit stdout logging failure (exit 255, missing results/coverage/baseline) and baseline handling; update CI guidance.

Key details

  1. 13.4.8 (19 November) fixes JUnit stdout logging failure with exit 255 and missing result, coverage and baseline output.
  2. Packagist lists PHP >=8.4.1 for 13.4.8.
  3. 13.4.7 also corrects executionOrder CLI/XML precedence, coverage risk misclassification and Composer preload fatal errors.
  4. PHPUnit 13.4.7 (Nov 13) fixes --fail-on-skipped falsely returning success on class-level skips and --stop-on-skipped failing to stop.
  5. PHPUnit 13.3.6 shipped September 25, 2026 with visible control/bidi escaping and compact record-header hardening.
  6. PHPUnit 13.4.0 shipped October 2 with `--timeout` and test-attributed compact output.
  7. `--timeout` applies to the whole run; exit status 124 and diagnostic output are intended on timeout.
  8. PHP Foundation October 8 analysis explains the human/agent output-integrity risks.
  9. Compact output bodies remain potentially spoofable; rely on exit status and machine-readable reports.
  10. PHPUnit 13 requires PHP 8.4 or later.
  11. `--show-effective-configuration` is planned for 13.5, not shipped in 13.4.
  12. No CVE or observed exploitation established for these output issues.
  13. October 16, 2026: PHPUnit 13.4.3 fixes malformed Open Test Reporting XML from test-controlled strings and several outcome/record attribution errors.

What builders should take away

  1. Retest JUnit logging to php://stdout, verify exit status and expected report artifacts, and check baseline application across directories.
  2. Combine process exit codes and structured XML results when coding agents or automated deploy gates interpret test success.
  3. Upgrade PHPUnit 13.4.x to 13.4.8 and test CI policy that relies on --fail-on-skipped/--stop-on-skipped, especially before-first-test class-level skip paths.
  4. Upgrade to a compatible PHPUnit 13.4 patch for agent-invoked test suites.
  5. Set a whole-run timeout and preserve exit codes and machine-readable results.
  6. Sandbox tests and restrict credentials; output escaping alone cannot secure arbitrary code.
  7. Review untrusted strings and output integrity in other tools agents call.
  8. Do not rely on the planned 13.5 inspection flag until it ships.
  9. For CI and coding-agent harnesses using Open Test Reporting XML, upgrade to PHPUnit 13.4.3 and validate parser behaviour on unusual output and multi-outcome tests.

What changed

NOVEMBER 19, 2026: PHPUnit 13.4.8 fixes a failure when JUnit XML is directed to php://stdout alongside regular runner output: XML could be emitted before the runner failed with exit code 255, omitting results, coverage reports and baseline output. It also fixes duplicate baseline entries and baseline application to files outside the baseline directory. NOVEMBER 13, 2026: PHPUnit maintainers shipped 13.4.7 with accuracy fixes that extend this dossier's concern about machine-readable evidence: `--fail-on-skipped` formerly could return a non-failure process exit code when a whole test class was skipped in a before-first-test method, despite the skipped tests being counted; `--stop-on-skipped` failed to halt in the same case. The update also corrects command-line vs XML `executionOrder` precedence, false deprecation warning on `default,random`, and hit-count coverage attribution that incorrectly treated some executed tests as risky. Composer-installed PHPUnit could preload unrelated code under PHPUnit or SebastianBergmann namespaces, causing a fatal error; related trace-filter rules were corrected. The patch does not newly establish a vulnerability exploited via agent tool output, but it changes how automation should interpret results. Earlier 13.4.3 Open Test Reporting XML validity and terminal escaping fixes remain part of the existing story. EARLIER RELEASE HISTORY: PHPUnit 13.3.6, released September 25, 2026, changed handling of test-controlled names, messages and terminal output: ANSI/control characters and bidirectional formatting characters are rendered visibly instead of passed through, and newlines in compact-output test identifiers no longer forge additional record headers. PHPUnit 13.4.0, released October 2, added a whole-run `--timeout` option and changed compact reporting so output produced by a test is attributed to that test. In an October 8 PHP Foundation analysis, maintainer Sebastian Bergmann explained why the same CLI output now has two readers—a coding agent interpreting bytes and a person viewing a terminal—and why differing renderings create a trust problem. On October 16, 2026, PHPUnit 13.4.3 shipped a further cluster of fixes affecting Open Test Reporting XML: invalid UTF-8, illegal XML characters, `]]>` and ANSI escapes in test-controlled names, output or messages could make reports malformed; incorrect or missing start/end records and wrong outcomes could also misattribute results. The same patch fixes dependency skipping, hook execution and process-isolation issues. This extends the output-integrity story beyond the 13.3.6/13.4 terminal-format changes.

Why it matters

The stdout regression could leave automation with partial XML evidence despite a failed runner. Treat exit 255 as failure, validate expected artifacts and avoid interpreting emitted XML alone as a successful run. An exit status of zero with an unintentionally skipped test class can falsely satisfy CI gates and coding-agent 'tests passed' assertions. After upgrading to PHPUnit 13.4.7, re-test pipelines configured with --fail-on-skipped and --stop-on-skipped, including a controlled before-first-test skip fixture. Use both exit code and structured reports, and do not equate fewer logged failures with complete test coverage. Other fixes prevent incorrect coverage and execution-order behaviour, reducing misleading evidence. Agents commonly invoke PHPUnit without supervision and summarise its logs to a human. A malicious or unusual test name can inject terminal erase sequences or text resembling a failure record, creating disagreement about what ran. A hanging test can consume an agent's execution budget and, if killed externally, leave no useful summary. PHPUnit's changes make its own output harder to spoof and enable bounded, inspectable failure. They do not eliminate prompt injection from arbitrary test output, stop malicious code execution or replace sandboxing and credential isolation. The October 16 patch makes structured CI and agent reports more reliable when tests print unusual or attacker-controlled strings. Teams should not assume XML reports are valid or trustworthy merely because compact terminal output is escaped; upgrade and parse the report, while retaining process isolation and exit-code checks.

November 19: JUnit stdout and baseline reliability

The upstream 13.4.8 release documents the stdout logging failure and baseline corrections. Packagist confirms the release date and PHP >=8.4.1 requirement; DepDelta independently indexes the version. No independent reproduction or exploitation is established.

November 13: fail-on-skipped and stop-on-skipped must agree with test outcomes

Official PHPUnit 13.4.7 release notes confirm two skipped-class regressions: --fail-on-skipped did not return failure when the class-level setup marked tests skipped, and --stop-on-skipped did not stop as expected. Fixes to test-order precedence, coverage contribution counting and Composer preloading are included. These matter for CI/agent feedback loops because a process exit status can contradict the test outcome. The update is a test-runner correctness patch, not a newly published security CVE.

Terminal output and compact records become harder to spoof

The 13.3.6 release escapes control and Unicode bidirectional formatting characters in test-controlled strings as visible `\u{NNNN}` sequences rather than silently stripping them. This prevents escape sequences from rewriting what a reviewer sees while an agent sees different bytes. Compact-output record headers are constrained to one line so a newline inside a data-provider name cannot invent a new `--- FAILURE:` record. Multiline message bodies can still contain misleading lines; compact output is for reading, not a machine-authenticated event stream.

A test-run limit that preserves evidence

PHPUnit 13.4 adds `--timeout` to bound the entire invocation, including bootstrap and suite loading. On timeout, PHPUnit aims to stop scheduling tests, produce logs and results, and exit with code 124. With pcntl available, an active test can be interrupted and reported with a stack trace. This is not a per-test CPU quota and cannot make arbitrary PHP execution safe.

Output becomes attributed, not passed through

PHPUnit 13.4's compact format reports text printed by tests in a `--- OUTPUT:` record associated with the test, unless strict-output checks already classify it as risky. This reduces ambiguity for CI readers and coding agents, but exit codes and structured results should determine pass/fail rather than LLM interpretation of free-form logs.

The next boundary remains a plan

The PHP Foundation says PHPUnit 13.5 is expected to add `--show-effective-configuration`, allowing a harness to inspect scripts, extensions and test paths without executing them. That option is prospective, not part of 13.4. Sandbox, network and credential restrictions remain the harness's responsibility. PHPUnit 13 requires PHP 8.4 or newer; test major-version compatibility before upgrading.

October 16: PHPUnit 13.4.3 repairs XML report integrity

The maintainer's 13.4.3 release notes list malformed Open Test Reporting XML caused by test names, exception messages and output containing `]]>`, invalid UTF-8 or characters illegal in XML, including ANSI escape sequences. Other fixes address missing start/end entries, duplicate end records and wrong outcome severity when a test both errors and fails. These bugs matter when CI parsers or coding agents consume structured output. The release also corrects dependency-skip checks and test-process isolation errors. These are bug fixes to existing report generation, not proof of an observed exploitation campaign.

What to watch next

  • Regression reports for JUnit stdout logging and baseline fixes in 13.4.8.
  • Whether 13.5 stabilises --show-effective-configuration and if further test-result correctness fixes affect CI/agent decisions.
  • PHPUnit 13.5 and the proposed effective-configuration preview.
  • Other PHP tools adopting output escaping and bounded execution.
  • Structured test-report adoption and residual output-body spoofing risks.
  • Regression reports for Open Test Reporting XML validity and agent harness parsing after 13.4.3.

Still unclear

  • No public exploit prevalence or CVE severity established.
  • Older PHPUnit branches may differ in these protections.
  • Output integrity does not prevent test code from accessing files, networks or credentials.
  • The maintainer confirms output/exit corrections, but no field measurement of how many pipelines returned false-positive success is available.

Sources

Direct reading behind this dossier.

8 sources
Your Tool Has a New Reader
The PHP Foundation / Sebastian Bergmann primary technical analysis

Threat model, fixes, limitations, timeout exit and proposed 13.5 behaviour.

PHPUnit 13.4.3 release notes
PHPUnit maintainers primary

Primary release fixes for malformed XML, outcome severity and process isolation.

PHPUnit release index
DepDelta independent release index

Corroborates 13.4.8 as latest stable, not independent bug reproduction.

Discussion

Discussion is reader-contributed. Comments are not part of the BTN dossier or its editorial evidence.

0 visible comments

Join the discussion

Keep comments useful and relevant. Reader contributions may be moderated and are not BTN editorial evidence.

Sign in to comment