#PHP Security

CVE-2026-129182: Use-After-Free Vulnerability in PHP

A critical vulnerability in PHP may cause memory corruption and allow remote code execution.

CVE-2026-129182: Use-After-Free Vulnerability in PHP

Introduction

The CVE-2026-129182 vulnerability refers to a critical issue in PHP that can result in memory corruption and potential remote code execution. This flaw occurs due to unexpected behavior during the request shutdown process.

What happened?

During the shutdown of a request, if a fatal error occurs while modified INI settings are being restored, it may lead to the repopulation of the stored fatal error backtrace. This happens after the executor has been cleaned up, leading to the freeing of the request memory. If, in a later request, a PHP-FPM or mod_php worker attempts to access this stale backtrace, it can result in memory corruption and worker crashes.

How does the vulnerability work?

The vulnerability is triggered by a fatal error that requires specific configuration of max_memory_limit or zlib.output_compression, along with the output_handler. Improper configuration may allow an early diagnostic to access the stale backtrace, leading to undesirable behaviors and potential security breaches.

What is the real impact?

The impact of this vulnerability is critical, as it can lead to memory corruption and PHP worker crashes. In adverse scenarios, it may also allow for remote code execution, posing a significant risk to the security of applications using affected versions of PHP.

Which versions are affected?

  • PHP 8.5.* before 8.5.13

How to fix

  1. Check the version of PHP running on your server.
  2. Update to the latest version of PHP that is not affected by this vulnerability.
  3. Refer to the vendor advisory to confirm the fixed version and additional details.

Mitigation while you update

While updating is not possible, consider the following mitigation measures:

  • Review PHP configurations to minimize the use of modified INI settings that may trigger the vulnerability.
  • Monitor server logs for anomalous behaviors that may indicate exploitation of the vulnerability.

Conclusion

CVE-2026-129182 represents a significant threat to the security of PHP applications. It is crucial for system administrators and developers to take immediate action to update their PHP versions and minimize associated risks.

// Fontes

  1. NVD — CVE-2026-129182 nvd.nist.gov ↗
  2. CVE.org — CVE-2026-129182 cve.org ↗
  3. GitHub github.com ↗

// ++ — related