External risk intelligence

PHP Use-After-Free Memory Corruption and Remote Code Execution Vulnerability.

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-129182

This vulnerability affects PHP-FPM or mod_php, which are core components of web servers. While it requires specific, non-default configuration patterns to trigger the fatal error and subsequent diagnostic, the underlying technology is overwhelmingly deployed as internet-facing web application infrastructure, making it highly probable that affected instances are reachable from the public internet.

Use After Free

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A recently identified vulnerability in PHP, a widely used web development language, presents a critical risk of memory corruption, worker crashes, and potential remote code execution. This issue arises from a specific sequence involving fatal errors during request shutdown and the subsequent handling of error backtraces, which can be triggered under certain configuration conditions that are not the default. The concern is heightened due to the potential for attackers to exploit this to gain control over affected systems.

  • Error in PHP could crash servers or allow code execution.
  • Widespread use of PHP makes this a significant potential risk.
  • Confirm relevance and exposure for critical systems.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this by leveraging specific server configurations that lead to a fatal error during request shutdown. When the server attempts to restore modified settings, it can inadvertently reuse memory that has already been freed, potentially corrupting data and leading to a crash or even remote code execution.

  • Entry condition: Specific server configurations.
  • Trigger point: Fatal error during request shutdown.
  • Resulting risk: Memory corruption or code execution.

Live Threat

Current exploitation, exposure, and threat context

A use-after-free vulnerability in PHP's error handling could lead to memory corruption and worker crashes when specific INI settings are restored during request shutdown. When a fatal error occurs under these conditions, a diagnostic can be emitted using a backtrace that has already been cleaned up, potentially allowing an attacker to access stale data.

  • PHP worker memory could be corrupted.
  • Stale backtrace data may be accessed.
  • Remote code execution is possible.

Operational Fix

Recommended remediation, mitigation, and detection steps

The core issue lies within PHP's error handling during request shutdown, specifically when using per-path configurations like `max_memory_limit` or `zlib.output_compression` with `output_handler`. This can lead to memory corruption and potential remote code execution. Technical leaders, security teams, and system owners responsible for web infrastructure, particularly those managing PHP-FPM or mod_php deployments, must prioritize identifying and assessing the risk associated with these specific configurations. The first practical move involves inventorying all PHP installations, confirming reachability and business criticality, identifying the accountable owner for each instance, and then developing a targeted remediation plan based on the identified risks.

  • Owner: Application or Infrastructure teams.
  • Verify first: Specific configurations, reachability, and criticality.
  • Action: Plan remediation based on risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is PHP-FPM or mod_php?

These are essential server-side components that allow web servers like Apache or Nginx to execute PHP scripts. They process dynamic web requests and generate the HTML content users see. Because they reside between the web server and the application, they are fundamental to running most PHP-based websites and platforms, acting as the engine that powers site functionality.

What does use-after-free mean for CVE-2026-129182?

This is a memory management error where the program continues to use a pointer to a memory location after that memory has been released. In this specific case, PHP fails to properly clear a fatal error backtrace during shutdown. If a new request reuses that memory while the old backtrace is still referenced, it creates a vulnerability that could allow an attacker to manipulate the program's logic, potentially leading to unauthorized code execution.

How is this vulnerability triggered?

The flaw requires two specific conditions: a fatal error occurring during the restoration of specific INI settings (like memory limits or compression) during request shutdown, and a subsequent diagnostic process. Standard or default PHP configurations do not typically trigger this sequence. It specifically depends on complex, non-default per-path or per-directory configuration setups that inadvertently leave stale data behind for the next request.

Why should I care if my PHP site is internet-facing?

According to Halo Surface Signal, this vulnerability impacts core web server components that are predominantly deployed as internet-facing infrastructure. Because these components are designed to handle incoming web traffic, they are directly reachable from the public internet. This makes any system running an affected version of PHP a potential target, as an attacker does not need prior internal network access to attempt to trigger the memory corruption.

Do I need to update my PHP installation?

If you are running versions 8.5.* prior to 8.5.13, you should prioritize this issue. Your first step is to inventory your PHP environments to identify which instances are currently running the affected versions. Evaluate whether these instances use the specific, non-default configuration patterns mentioned in the advisory. Once identified, coordinate with your infrastructure team to plan and apply the necessary updates to a patched version.

References