As part of CVE-2026-109619 ( GHSA-6wmf-4rv5-p3rp ), PHP 8.5.12 fixes a generic use-after-free of the last_fatal_error_backtrace global by clearing it during executor shutdown. Further scenarios have been discovered in which a fatal diagnostic during later shutdown work repopulates the global. The request heap is then released, and an early diagnostic in a subsequent request handled by the same worker can access the stale backtrace before normal executor initialization.
The backtrace can be recreated while PHP restores modified INI settings after executor cleanup:
When max_memory_limit is specified in both the global and a path-specific configuration, restoring the global limit can fail if memory consumption still exceeds that limit. The resulting fatal error recreates the backtrace.
When the global configuration specifies zlib.output_compression=1 , and a path-specific configuration specifies zlib.output_compression=0 and output_handler=ob_gzhandler (or another handler), restoring compression before restoring output_handler can raise a fatal configuration error because the two settings conflict.
Both shutdown cases are possible with PHP-FPM and mod_php. The max_memory_limit override requires administrative configuration. .user.ini can supply the zlib settings but cannot change max_memory_limit .
Exploitation also requires a diagnostic before executor initialization in a later request handled by the same worker. Apache per-directory configuration can provide this. FPM is conditionally exposed when the frontend sends a diagnostic-producing PHP_VALUE or PHP_ADMIN_VALUE FastCGI parameter. Ordinary FPM pool settings and .user.ini do not provide this early diagnostic.
The fix is generic: PHP no longer creates or consumes the fatal-error backtrace while the executor is inactive. This also covers other shutdown diagnostics that might recreate the same state.
Successful exploitation can result in memory corruption and potentially full remote code execution (RCE), as in CVE-2026-109619 ( GHSA-6wmf-4rv5-p3rp ). The two restoration cases demonstrate heap use-after-free and worker crashes. RCE through these specific entry points has not been demonstrated.
Upgrade to PHP 8.5.13 when it becomes available. As a temporary workaround, disable fatal-error backtraces administratively with fatal_error_backtraces=0 and restart all workers. Ensure that request-specific configuration cannot re-enable the setting.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
