Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

PHP Fatal Error Backtrace Use After Free (CVE-2026-129182)

CVE-2026-129182 is a use-after-free flaw in PHP 8.5 fatal-error backtrace handling.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-129182
Vendor
PHP Group
Affected Product
PHP
Exploitation
Not confirmed
Published
2026-11-19

A shutdown diagnostic can recreate a stored backtrace after executor cleanup. A later request on the same worker may read that backtrace after its request memory has been freed.The PHP CNA published the record on 19 November 2026 and assigns a Critical CVSS 4.0 score of 9.2. PHP 8.5.0 through 8.5.12 are affected. PHP 8.5.13 contains the fix.

What it allows

How Does CVE-2026-129182 Work?

PHP 8.5.12 cleared a stale fatal-error backtrace during executor shutdown to address an earlier flaw. The new advisory identifies later shutdown paths that can recreate it while modified INI settings are restored. Once the request heap is released, the saved backtrace points into freed memory.

A later request must reach an early diagnostic on the same PHP-FPM or mod_php worker, before executor initialization. Reading the stale backtrace can corrupt memory or crash the worker. PHP says remote code execution may be possible, but the two documented restoration cases have demonstrated use after free and crashes, not RCE.

The shutdown diagnostic requires a specific per-path configuration. One case restores a global max_memory_limit after a path override while memory use exceeds that limit. Another restores global zlib.output_compression before a conflicting path-specific output_handler setting is cleared.

The later early diagnostic can arise from Apache per-directory configuration. For PHP-FPM, the front end must send a diagnostic-producing PHP_VALUE or PHP_ADMIN_VALUE FastCGI parameter. Ordinary FPM pool settings and .user.ini alone do not create that early diagnostic. See our PHP security release coverage for the wider release context.

Who is affected

Version Check

PHP
Release LineAffected RangeFixed In
8.5.x8.5.0 to before 8.5.138.5.13
Release ranges source

For distribution packages and custom builds, check the supplier’s advisory.

Verify the running web worker and effective per-path settings; distribution backports need vendor patch confirmation.

Which PHP Versions and Configurations Are Affected by CVE-2026-129182?

The PHP CNA lists PHP 8.5.0 inclusive through versions before 8.5.13. The vendor lists 8.5.13 as patched. This range describes the vulnerable engine; the documented remote path additionally requires the shutdown and early-diagnostic conditions above.

Both PHP-FPM and mod_php can encounter the described shutdown cases. The max_memory_limit override requires administrative configuration. A .user.ini file can supply the zlib settings, but cannot change max_memory_limit. Review effective settings per path and worker, not only the global configuration.

Inventory the running web-worker version and verify how the front end supplies PHP configuration. A CLI version or configuration check alone may not represent the affected worker. Record the patched deployment in your patch management process.

Use Vulnerability Intelligence to prioritize the affected application inventory while engineers confirm the effective runtime configuration. This is an inventory recommendation, not a claim that a network scan can prove the per-path conditions.

Timeline

  1. 2026-11-19

    The PHP Group published the CVE record and security advisory.

  2. 2026-11-19

    PHP 8.5.13 was released with the CVE-2026-129182 fix.

What to do

  1. Identify affected web workers

    Inventory PHP 8.5.0 through 8.5.12 across PHP-FPM and mod_php deployments. Check effective per-path settings and the front-end configuration for the documented conditions.

  2. Upgrade to PHP 8.5.13

    Apply PHP 8.5.13 or a vendor-documented backport. Restart affected workers, then confirm that the running web-worker version or documented package fix is present.

  3. Use the vendor's temporary workaround

    If patching is delayed, administratively set fatal_error_backtraces=0 and restart all workers. Confirm that request-specific configuration cannot re-enable the setting.

  4. Review worker failures

    Review PHP and application logs for fatal diagnostics followed by abnormal exits on exposed workers. This is a defensive review suggestion, not a signature or proof of exploitation.

What Brandefense can do

Frequently Asked Questions

Does every PHP 8.5 deployment expose the remote path?

No. PHP describes specific per-path shutdown errors and an early diagnostic on a subsequent request in the same worker. Check the effective web configuration before assessing exposure.

Which version fixes CVE-2026-129182?

PHP 8.5.13 contains the fix. Confirm the running web-worker version after restarting, or verify a vendor-documented backport for a distribution package.

Can .user.ini alone satisfy the FPM early-diagnostic condition?

No. PHP says FPM needs a diagnostic-producing FastCGI parameter from the front end. A .user.ini file can supply the zlib shutdown settings, but not that later early diagnostic.

Has remote code execution been demonstrated for the documented cases?

PHP says these two restoration cases demonstrated heap use after free and worker crashes. It says code execution may be possible, but has not demonstrated RCE through those specific entry points.

Sources

  1. PHP Security Advisory GHSA-2fjv-p558-g82mPHP Group
  2. CVE-2026-129182 RecordPHP CNA via CVE Program
  3. PHP 8 ChangeLogPHP Group
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →