Skip to content
NewA calmer, faster ZeroHour

CVE-2026-129182

Use-after-free in PHP 8.5 shutdown backtrace handling

CVSS 4.0
9.2 critical
EPSS
—
Published
·
Modified
Analyze CVE-2026-129182 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

A fatal error while restoring modified INI settings during request shutdown can repopulate PHP's stored fatal-error backtrace after the executor is cleaned up. A later request on the same PHP-FPM or mod_php worker can then read that freed memory via an early diagnostic, causing corruption, worker crashes, and possibly remote code execution. Triggering needs per-path max_memory_limit or zlib.output_compression with output_handler, plus Apache per-directory config or a PHP_VALUE/PHP_ADMIN_VALUE from the front end. PHP 8.5 before 8.5.13 is affected.

What to do: Upgrade PHP to 8.5.13.

ProductAffectedFixed in
PHP8.5.* before 8.5.138.5.13
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown. A fatal error raised while modified INI settings are restored during request shutdown can repopulate the stored fatal error backtrace after the executor has been cleaned up. The request memory is then freed, and a diagnostic emitted before executor initialization in a later request handled by the same PHP-FPM or mod_php worker can access the stale backtrace. The shutdown error requires per-path configuration of max_memory_limit, or of zlib.output_compression together with output_handler (which .user.ini can also set). The early diagnostic requires Apache per-directory configuration or, for PHP-FPM, a PHP_VALUE or PHP_ADMIN_VALUE parameter sent by the front end. This can cause memory corruption and worker crashes, and may allow remote code execution. This issue affects PHP versions 8.5.* before 8.5.13.

Weakness
CWE-416, CWE-459
Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

6 stories