External risk intelligence

PHP Use-After-Free on Session Shutdown

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-129481

This vulnerability affects the PHP runtime engine, which is ubiquitously deployed to power public-facing web applications and API services. Because PHP is a primary technology used for internet-accessible web server environments, the affected session handling functionality is frequently reachable via the public network in common real-world web deployment patterns.

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

This vulnerability is a use-after-free issue in the PHP session handling mechanism that could lead to a crash or memory corruption. It arises when an interrupted session shutdown occurs due to a fatal error in specific application callbacks. While direct code execution has not been demonstrated, the potential for instability and data integrity issues exists for applications relying on the affected PHP versions.

  • Session shutdown error can cause instability.
  • Affects core web application runtime.
  • Confirm relevance and exposure for PHP applications.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by triggering a specific error condition during session shutdown in PHP applications. This could happen if an application callback fails fatally while session data is being cleaned up, particularly if a user-defined stream wrapper is involved. If the filename of the executing script was stored in request memory and not cached, a subsequent request handled by the same worker process could attempt to free memory that has already been released, potentially leading to a crash or memory corruption.

  • Entry condition: Network access, no privileges needed.
  • Trigger point: Fatal error during session cleanup.
  • Resulting risk: Worker crash or memory corruption.

Live Threat

Current exploitation, exposure, and threat context

A use-after-free vulnerability in PHP could allow an attacker to crash a worker process or corrupt memory when session cleanup is interrupted by a fatal error in an application callback. This scenario is more likely when the executing script's filename is not cached by OPcache, as the filename would be allocated in request memory. While code execution has not been demonstrated, successful exploitation could disrupt service availability.

  • PHP worker processes
  • Interrupted session cleanup
  • Service disruption

Operational Fix

Recommended remediation, mitigation, and detection steps

This critical vulnerability in PHP's session handling requires careful triage to understand its impact. Application owners, in coordination with infrastructure or platform teams, should prioritize identifying where this PHP version is deployed. Confirming reachability and business criticality will inform the remediation plan, potentially involving vendor coordination or temporary risk reduction measures if immediate patching is not feasible.

  • Application owners should lead remediation efforts.
  • Verify deployment reachability and criticality.
  • Plan remediation based on assessed 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 and how does it relate to CVE-2026-129481?

PHP is a widely used server-side scripting language that powers the backend of many websites and API services. It processes code to generate dynamic web pages. CVE-2026-129481 concerns a defect within the PHP runtime engine itself—specifically in how it manages memory during session cleanup—which can affect any application built on the vulnerable versions.

What is a use-after-free vulnerability in the context of this CVE?

A use-after-free, or CWE-416, occurs when a program continues to use a memory pointer after that memory has been officially released. In this specific case, a fatal error during session shutdown leaves behind a stale reference to a filename. If the system tries to access this freed memory later, it can cause the application worker to crash or result in unintended memory corruption.

How can an attacker trigger this memory corruption?

An attacker must prompt a fatal error during the session cleanup process, typically involving a custom stream wrapper. The bug is specifically tied to how PHP handles scripts that are not cached by OPcache. If the script is already cached by OPcache, the filename is stored differently in memory, which prevents this specific trigger path from occurring.

Why should I care about CVE-2026-129481 if my apps are internal?

Halo Surface Signal notes that because PHP is a core technology for web environments, these session handling functions are often reachable over a network. While external-facing applications are at higher risk, any environment running these PHP versions remains susceptible if an attacker can reach the application's session management endpoints.

What should I do if I am running the affected PHP versions?

First, conduct an inventory to locate all services running PHP 8.3, 8.4, or 8.5 to determine where these versions are deployed. Prioritize these assets based on their business criticality and network exposure. Work with your infrastructure or platform teams to plan for an update to the patched versions as recommended by the vendor to resolve the underlying instability.

References