Summary
CVE-2026-129182 is a use-after-free vulnerability (CWE-416, with CWE-459 Incomplete Cleanup) in PHP 8.5.0 through 8.5.12. A fatal error during INI settings restoration can leave memory in a corrupt state that is accessed in later requests, potentially enabling remote code execution. It is rated Critical (CVSS v4.0 score 9.2).
Technical details
- Root cause: the
last_fatal_error_backtraceglobal is repopulated after shutdown, leading to a use-after-free. - Trigger conditions: a fatal error occurs during INI settings restoration. The corrupted memory is then accessed in subsequent requests handled by the same PHP-FPM or mod_php worker.
- Attack vector: Network, with no privileges and no user interaction required. The CVSS vector includes Attack Requirements: Present (AT:P).
- Impact: memory corruption that can potentially lead to remote code execution, with high impact to confidentiality, integrity and availability.
Affected software
- PHP 8.5.0 through 8.5.12
Severity
- CVSS v4.0 base score 9.2 (Critical):
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - The CVE record provides a CVSS v4.0 score. No CVSS v3.1 score was available in the sources reviewed.
Mitigation and recommended actions
- Immediate: upgrade PHP to version 8.5.13 or later.
- No workarounds are listed in the CVE record. Review the PHP advisory for any further guidance.

