## Overview
CVE-2026-129182 is a critical vulnerability in PHP that allows for remote code execution. The flaw arises from a use-after-free condition related to the `last_fatal_error_backtrace` global variable. This issue affects PHP versions 8.5.* prior to 8.5.13.
## Technical Details
During request shutdown, a fatal error can occur while restoring modified INI settings. This can lead to the repopulation of the stored fatal error backtrace after the executor has been cleaned up. Once the request memory is freed, a diagnostic may be emitted before the executor initializes in a subsequent request handled by the same PHP-FPM or mod_php worker. The shutdown error necessitates specific configurations, such as `max_memory_limit` or `zlib.output_compression`, which can be set in `.user.ini`. The early diagnostic requires Apache per-directory configuration or specific PHP values sent by the front end.
## Impact
This vulnerability can cause memory corruption and crashes in PHP workers. More critically, it may allow attackers to execute arbitrary code remotely. Exploitation of this flaw could lead to severe security breaches in affected systems.
## Mitigation
Defenders should immediately update to PHP version 8.5.13 or later. Regularly check for updates and apply patches to mitigate risks from this and other vulnerabilities. Organizations should also review their PHP configurations to ensure they are not exposing themselves to potential exploits.
CSURFACE Threat Sensor