## Overview
CVE-2026-129182 is a critical vulnerability in PHP that affects versions 8.5.* prior to 8.5.13. This flaw can lead to remote code execution due to a use-after-free condition.
## Technical Details
The vulnerability arises when a fatal error occurs during the restoration of modified INI settings at request shutdown. This process can repopulate the stored fatal error backtrace after the executor has been cleaned up. When the request memory is freed, a diagnostic is emitted before the executor initializes in a subsequent request handled by the same PHP-FPM or mod_php worker. The shutdown error necessitates specific configuration settings, such as `max_memory_limit` or `zlib.output_compression`, which can be set via `.user.ini`. The early diagnostic requires configuration adjustments in Apache or specific PHP parameters.
## Impact
Exploitation of this vulnerability can lead to memory corruption and crashes of the worker process. In some cases, it may allow remote code execution, posing a significant risk to affected systems. The critical severity of this flaw is reflected in its CVSS score of 9.2.
## Mitigation
Defenders should immediately upgrade to PHP version 8.5.13 or later to mitigate this vulnerability. PHP maintainers have also released patches for earlier versions, including 8.4.28, 8.3.37, and 8.2.36, addressing this and other critical flaws. Regularly updating PHP and applying security patches is essential to maintaining secure server environments.
CSURFACE Threat Sensor