## Overview
CVE-2026-129496 is a critical vulnerability in PHP that can lead to remote code execution. This flaw affects non-thread-safe builds of PHP. It arises when a diagnostic is logged during module startup, which can cause a use-after-free condition in the timezone cache.
## Technical Details
During the startup of PHP, if an invalid `date.timezone` value or a session configuration warning is encountered, a diagnostic is written to a file-based `error_log`. This action allocates the timezone cache in memory. If a subsequent request raises a warning, such as the `max_input_vars` warning, the system may access the already freed cache. This results in an exploitable condition where an unauthenticated remote attacker can crash PHP-FPM, Apache mod_php, or CGI workers with a specially crafted request. In certain scenarios, arbitrary code execution has been demonstrated using known memory addresses.
## Impact
The vulnerability affects PHP versions prior to 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28, and 8.5.* before 8.5.13. Exploitation can lead to severe consequences, including the potential for remote code execution, which poses a significant risk to affected systems.
## Mitigation
Defenders should immediately update their PHP installations to the latest versions: 8.2.36, 8.3.37, 8.4.28, or 8.5.13. Organizations should also review their configurations to ensure they are not using non-thread-safe builds. Regularly applying security patches and monitoring for unusual activity can help mitigate the risks associated with this vulnerability.
CSURFACE Threat Sensor