Skip to content

CVE-2026-129182: PHP Use-After-Free via Stale Fatal Error Backtrace After Shutdown

Written by:
CVE-2026-129182: PHP Use-After-Free via Stale Fatal Error Backtrace After Shutdown
CVE IDCVE-2026-129182
Affected productPHP Group PHP
SeverityCritical CVSS 9.2 (v4.0)
ExploitationNo known exploitation
CISA KEVNot listed
Fix availableYes
Bulletin statusAnalysis complete · Last updated 2026-11-20

Key takeaways

  • Affects PHP 8.5.0 through 8.5.12.
  • No known exploitation yet: patch before attackers catch up.
  • Upgrade PHP 8.5.x installations to 8.5.13 as soon as possible. Administrators running PHP 8.4, 8.3, or 8.2 should consult the November 2026 PHP security releases (8.4.28, 8.3.37, and 8.2.36) for any related fixes….

Summary

CVE-2026-129182 is a use-after-free vulnerability in PHP affecting all 8.5.x releases before 8.5.13. During request shutdown, if a fatal error is raised while modified INI settings are being restored, the global last_fatal_error_backtrace can be repopulated after the executor has already been cleaned up. The associated request memory is then freed, and a diagnostic emitted early in a subsequent request handled by the same PHP-FPM or mod_php worker can access that stale backtrace, leading to memory corruption, worker crashes, and potentially remote code execution. The vulnerability was disclosed on 19 November 2026, and PHP 8.5.13 is available to address it.

Technical details

The flaw (CWE-416, use-after-free; CWE-459, incomplete cleanup) stems from a race between PHP's request shutdown sequence and the global backtrace storage. When INI settings are restored at shutdown and a fatal error fires during that process, the backtrace global is written to memory that the runtime has already scheduled for release. A subsequent request on the same long-lived worker process — before executor re-initialization completes — can read that freed memory region through an early diagnostic path, corrupting the heap or triggering a crash. Exploitation is network-reachable and requires no authentication, but triggering the vulnerable shutdown path requires either per-path memory_limit configuration or zlib.output_compression combined with output_handler (both of which a .user.ini file can also set). The early diagnostic path further requires Apache per-directory configuration or, for PHP-FPM, a PHP_VALUE or PHP_ADMIN_VALUE parameter supplied by the front end. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H) reflects the network-reachable, unauthenticated nature of the flaw alongside the prerequisite configuration condition (AT:P). The exact exploitable code path has not been made fully public.

CVSS 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

Affected products

Product / branchAffected versionsFixed version
PHP8.5.0 through 8.5.128.5.13

Impact

  • Remote code execution: An unauthenticated remote attacker who can trigger the vulnerable shutdown and early-diagnostic code paths may be able to execute arbitrary code in the context of the PHP worker process.
  • Memory corruption and worker crashes: Access to freed memory can corrupt the PHP-FPM or mod_php worker heap, causing unpredictable crashes and denial of service for the affected worker.
  • Broad attack surface on misconfigured hosts: Servers using `.user.ini` files, per-directory Apache configuration, or front-end-supplied `PHP_VALUE` parameters may meet the required conditions without operators being aware.
  • High confidentiality and integrity impact: A successful exploit grants full control over data processed by the worker, as reflected in the CVSS high ratings for confidentiality, integrity, and availability.

Exploitation status

As of 2026-11-20, no in-the-wild exploitation has been confirmed as of the disclosure date of 19 November 2026, and this CVE does not appear on the CISA Known Exploited Vulnerabilities catalog. No public proof-of-concept code has been identified. However, the CVSS 4.0 score of 9.2 (Critical), the network-reachable unauthenticated attack vector, and CISA's SSVC assessment that the vulnerability is automatable with total technical impact make prompt patching a high priority even in the absence of observed exploitation.

Recommendations

  1. Upgrade PHP 8.5.x installations to 8.5.13: as soon as possible. Administrators running PHP 8.4, 8.3, or 8.2 should consult the November 2026 PHP security releases (8.4.28, 8.3.37, and 8.2.36) for any related fixes applicable to those branches.
  2. Audit INI configurations: for per-path memory_limit overrides and for zlib.output_compression combined with output_handler in .user.ini files or virtual-host configurations; remove or restrict these settings where they are not operationally required.
  3. Restrict front-end PHP_VALUE and PHP_ADMIN_VALUE parameters: passed to PHP-FPM pools to only those explicitly needed, and validate that your Nginx or Apache front-end configurations do not expose unnecessary INI override capabilities.
  4. Review Apache per-directory configuration: (.htaccess and <Directory> blocks) for INI directives that could be leveraged to meet the exploitation preconditions, and disable AllowOverride for untrusted directories where possible.
  5. Monitor PHP-FPM and mod_php worker logs: for unexpected crashes, segmentation faults, or abnormal restarts, which may indicate attempted or successful exploitation of memory-corruption conditions.
  6. Verify the patch: by confirming that php --version or your platform's package manager reports version 8.5.13 or later on all affected hosts.

How Uptycs helps

Uptycs vulnerability management continuously inventories PHP versions across hosts, containers, and cloud workloads, enabling security teams to immediately identify all assets running PHP 8.5.0 through 8.5.12 and prioritize patching. Uptycs Threat Research is actively monitoring CVE-2026-129182 for changes in exploitation activity and will update this bulletin if new evidence of in-the-wild attacks or public proof-of-concept code emerges.

References

Update history

  • 2026-11-20: Initial publication.

See how Uptycs finds affected assets across your hybrid cloud.

Get a demo
Verifiable AI white paper coverWhite Paper

Verifiable AI: The Foundation for Trust in Cybersecurity

Download copy

Written by:

Uptycs Threat Research

Uptycs Threat Research

Research and updates from the Uptycs Threat Research team.