Read the docs

Use-after-free in PHP after request shutdown exposes stale backtrace

Priority HIGH 68CWE-416Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-416 and the CVSS impact.

Summary

PHP from 8.5.0 before 8.5.13 has a use-after-free (CWE-416). A fatal error raised while INI settings are restored at request shutdown repopulates the stored backtrace after the executor is cleaned up, so a later request in the same worker can read freed memory. An unauthenticated remote attacker needs specific per-path configuration to trigger it, and the flaw can cause memory corruption, worker crashes and possibly remote code execution.

Written with Claude Haiku 5.5 from the sources below · 2026-11-23

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.2398 98th percentileScored 2026-11-30
Fix Fixed PHP (PHP Group): 8.5.13engine (php): 8.5.13Red Hat: 1 advisory

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
PHP GroupPHP8.5.0 to before 8.5.138.5.13Patch availableCNA
—engine (php)>= 8.5.0, < 8.5.138.5.13Patch availableGHSA-2fjv-p558-g82m
  • PHP VendorPHP Group Affected 8.5.0 to before 8.5.13 Fixed in 8.5.13 Patch available CNA
  • engine (php) Vendor— Affected >= 8.5.0, < 8.5.13 Fixed in 8.5.13 Patch available GHSA-2fjv-p558-g82m

CPE names CNA · 1

CPEVersionsRoleVendor
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*——PHP
  • cpe:2.3:a:php:php:*:*:*:*:*:*:*:* Versions — — ·PHP

Remediation

Upgrade PHP to 8.5.13 or later. Red Hat fixes Red Hat Hardened Images in advisory RHSA-2026:101658.

Written with Claude Haiku 5.5 from the sources below · 2026-11-23

  • Fix · CNA PHP (PHP Group) Fixed in 8.5.13
  • Fix · GHSA-2fjv-p558-g82m engine (php) Fixed in 8.5.13 Advisory →

Red Hat 1 advisory

  • RHSA-2026:101658 Released 2026-11-22 · Red Hat rating Critical
    Red Hat Hardened Images RPMs bug fix and enhancement update
    • Red Hat Hardened Images php-8.5.13-0.1.hum1@aarch64, php-8.5.13-0.1.hum1@s390x, php-8.5.13-0.1.hum1@src +47

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    PHP 8.5.13

    3 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM, 1 LOW

    Other records, highest priority first

    • TI-2026-94662 Use-after-free in PHP magic method backtraces enables code executionPriority MEDIUM 61
    • TI-2026-94661 Incorrect RFC 3986 URI serialization in PHP for oversized inputPriority LOW 29

Vendor assessments

Red Hat

Red Hat rating: Critical. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Hardened ImagesFixed RHSA-2026:101658
Not affected: 5 products
  • Red Hat Enterprise Linux 10
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Timeline

  1. 2026-11-19 Threatist record created from GHSA-2fjv-p558-g82m
  2. 2026-11-19 Alias added: CVE-2026-129182
  3. 2026-11-19 CVSS score added · CNA
  4. 2026-11-19 Weakness changed · CNA
  5. 2026-11-19 Fix available: PHP Group/[email protected] · CNA
  6. 2026-11-19 1 new reference · CNA
  7. 2026-11-19 CISA SSVC decision points changed
  8. 2026-11-19 Affected versions changed · Red Hat
  9. 2026-11-19 CVSS score added · Red Hat
  10. 2026-11-20 CISA SSVC decision points changed
  11. 2026-11-20 CISA SSVC decision points changed
  12. 2026-11-23 Fix available: RHSA-2026:101658 · Red Hat
  13. 2026-11-23 Fix available: Red Hat Hardened Images · Red Hat
  14. 2026-11-25 EPSS moved to the below the 50th percentile
  15. 2026-11-27 EPSS moved to the 95th–99th percentile

References

  • TI-2024-04260 Argument injection in PHP-CGI on Windows lets attackers pass options KEVCVSS 3.1CRITICAL 9.8
  • TI-2026-78794 Stale global state enables remote code execution in PHP KEVCVSS 4.0CRITICAL 9.2
  • TI-2026-78793 Out-of-memory error handling in PHP allows remote code execution KEVCVSS 4.0CRITICAL 9.2
  • TI-2026-94671 Session serializer mismatch in PHP enables object injection CVSS 4.0CRITICAL 9.2
  • TI-2024-01743 Command injection via array-ish $command parameter of proc_open() CVSS 3.1CRITICAL 9.4
  • TI-2022-13555 PDO::quote() may return unquoted string CVSS 3.1CRITICAL 9.1
See all 124 →

Sources