## Overview
PHP has a critical vulnerability identified as CVE-2026-129474. This flaw involves a use-after-free condition in magic method backtraces. It affects PHP versions 8.5.* prior to 8.5.13. Attackers can exploit this vulnerability to execute arbitrary code remotely.
## Technical Details
The issue arises when PHP collects arguments from method calls handled by the `__call()` or `__callStatic()` methods for backtraces. If a fatal error occurs, such as exceeding the memory limit, PHP may read stale values that point to freed memory. This situation can lead to memory corruption or crashing the PHP worker. If an attacker controls enough request data, they can manipulate memory allocation and potentially execute arbitrary code. The default configuration enables `fatal_error_backtraces`, which exacerbates the risk, while `zend.exception_ignore_args` is disabled in the default php.ini-production settings.
## Impact
The vulnerability has a CVSS score of 9.2, indicating a critical severity level. Successful exploitation could allow attackers to execute arbitrary code on affected systems, leading to severe security breaches. Organizations running vulnerable versions of PHP are at significant risk.
## Mitigation
Defenders should update to PHP version 8.5.13 or later immediately to mitigate this vulnerability. Regularly review and adjust PHP configurations, particularly regarding error handling and memory management settings. Stay informed about ongoing security updates and patches from PHP and other relevant sources.
CSURFACE Threat Sensor