Abstract image representing cybersecurity and code, with PHP logo or shield icon
Technology & Gadgets

PHP Foundation Patches 7 Critical Vulnerabilities, Averting Remote Code Execution Threats

Share
Share
Pinterest Hidden

Urgent Security Update: PHP Foundation Addresses Critical Flaws

The PHP Foundation has issued a vital security update, patching seven critical vulnerabilities that could expose web applications to severe risks, including remote code execution (RCE). This comprehensive patch, released following an advance notice to users, targets weaknesses across all supported PHP versions, particularly under non-default or uncommon configurations. Successful exploitation of these defects could lead to devastating consequences such as remote code execution, session corruption, denial-of-service, memory corruption, and local privilege escalation.

The Critical Vulnerabilities: A Deep Dive

The security bulletin highlights several high-severity flaws, each carrying a CVSS score of 9.2, underscoring their critical nature. Developers and system administrators are strongly advised to update their PHP installations immediately to the patched versions.

CVE-2026-115560: Improper Input Validation (CVSS: 9.2)

This vulnerability stems from improper input validation, potentially allowing attackers to achieve remote code execution, modify files, corrupt sessions, or instigate denial-of-service attacks. This flaw has been addressed in PHP versions 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0.

CVE-2026-129182 & CVE-2026-129474 & CVE-2026-129481 & CVE-2026-129496: Use-After-Free Exploits (CVSS: 9.2)

Multiple use-after-free vulnerabilities have been identified, posing significant threats. CVE-2026-129182 and CVE-2026-129474 could lead to memory corruption and full remote code execution, particularly affecting PHP 8.5 and later. CVE-2026-129481 could cause session cleanup failures, memory corruption, or worker crashes, potentially enabling RCE. CVE-2026-129496 allows unauthenticated remote attackers to crash PHP workers or execute arbitrary code with their privileges.

  • CVE-2026-129182: Fixed in PHP 8.5.13, 8.6.0.
  • CVE-2026-129474: Fixed in PHP 8.5.13, 8.6.0.
  • CVE-2026-129481: Fixed in PHP 8.3.37, 8.4.28, 8.5.13, 8.6.0.
  • CVE-2026-129496: Fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, 8.6.0.

CVE-2026-126714: “phpAfterShell” TOCTOU Vulnerability (CVSS: 9.2)

Dubbed “phpAfterShell” by Depthfirst, CVE-2026-126714 is a Time-of-check Time-of-use (TOCTOU) vulnerability. This flaw can allow arbitrary code execution with the privileges of the PHP worker. It requires an attacker to influence session data, interrupt a file write at a critical moment, and leverage a suitable deserialization gadget chain within the application. Depthfirst explains, “If a pwrite()/ftruncate() update is interrupted, PHP may leave behind a malformed session file that is later loaded by session_start(), yielding an arbitrary deserialization primitive.” Chaining this with other deserialization-to-RCE findings can lead directly to remote code execution. This vulnerability is fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0.

CVE-2026-129289: Inconsistent HTTP Request Interpretation (CVSS: 9.2)

This vulnerability involves an inconsistent interpretation of HTTP requests, enabling attackers to execute controlled PHP code as the worker without user interaction or non-default PHP configurations. Exploitation requires a frontend that supports persistent backend connections and an application path that opens “php://input” without fully reading it. Common examples include nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, HAProxy FastCGI applications, and LSAPI. This is fixed in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0.

CVE-2026-129291: Local Privilege Escalation (CVSS: 8.8)

While slightly lower in CVSS score, CVE-2026-129291 is a significant use-after-free vulnerability leading to local privilege escalation. Successful exploitation requires local code execution within an FPM worker, an affected pool with catch_workers_output enabled, the epoll event backend, and the ability to manipulate worker lifetimes and inherited pipe descriptors. This flaw is patched in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0.

The “phpAfterShell” Mechanism Explained

The “phpAfterShell” vulnerability (CVE-2026-126714) is particularly ingenious. It exploits how PHP handles session data writes to disk. When a pwrite() or ftruncate() update is interrupted, PHP can leave a malformed session file. This file, when later loaded by session_start(), can be manipulated to interpret previously harmless data as executable object data. Security researcher Yuhang Wu notes, “By carefully choosing the length fields in the new prefix, an attacker can make PHP’s Session decoder interpret leftover bytes that were previously part of an old session as new, malicious data.” This creates a critical window for remote code execution by mixing old and new session states.

Call to Action: Update Your PHP Installations Now

Given the severity and potential impact of these vulnerabilities, immediate action is paramount. The PHP Foundation urges all users to update their PHP installations to the latest patched versions (PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, 8.6.0) to safeguard their applications and servers against these critical threats. Proactive patching is the most effective defense against sophisticated cyberattacks.


For more details, visit our website.

Source: Link

Share

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *