Mastodon Mastodon Mastodon Mastodon

PHP Foundation fixes eight vulnerabilities — seven critical RCE issues and one local privilege escalation in PHP

Photo of author

CyberSecureFox Editorial Team

Published:

PHP Foundation has released security updates fixing eight vulnerabilities — seven with a critical CVSS 9.2 score and one rated 8.8. The vulnerabilities affect PHP branches from 8.1 to 8.5 and cover the language core, the session subsystem, the date module, and PHP-FPM. Four of them are use-after-free issues, one is a TOCTOU race with deserialization, one is FastCGI request smuggling, one is improper input validation, and one more is a local privilege escalation via FPM. Patches are available in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0. Server administrators running PHP are advised to update immediately — especially when using PHP-FPM with persistent connections or file-based sessions.

Technical details of the vulnerabilities

The title of the original advisory refers to “7 critical vulnerabilities”, but in fact eight CVEs have been disclosed: seven are rated Critical 9.2, and CVE-2026-129291 is rated High 8.8, since it requires local access to an FPM worker.

Vulnerabilities with a remote attack vector (CVSS 9.2)

  • CVE-2026-115560 — improper input validation in ext-session leading to remote code execution, file modification, session corruption, or denial of service. Affected versions are prior to 8.2.36, 8.3.x before 8.3.37, 8.4.x before 8.4.28, and 8.5.x before 8.5.13. We have already analyzed this vulnerability in the context of the PHP2Shell series.
  • CVE-2026-129182 — a use-after-free in the PHP core that can lead to memory corruption and full remote code execution. Only versions 8.5.0–8.5.12 are affected.
  • CVE-2026-126714 (phpAfterShell) — a TOCTOU vulnerability in the file-based session handler. If a write operation is interrupted, PHP may leave a corrupted session file which, on a subsequent session_start(), gives the attacker an arbitrary deserialization primitive. According to researchers from Depthfirst, in combination with a suitable deserialization chain this leads to remote code execution. All branches from 8.2 to 8.5 are affected.
  • CVE-2026-129289 — inconsistent HTTP request interpretation in PHP-FPM. Unread bytes from the request body can be interpreted as a separate FastCGI request, allowing an unauthenticated attacker to execute arbitrary PHP code with worker privileges. Condition: a frontend with persistent connections to the backend (nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, HAProxy FastCGI, LSAPI) and an application that opens php://input without reading the body completely.
  • CVE-2026-129474 — a use-after-free when collecting arguments for a method handled via __call() or __callStatic(). Enables remote code execution on PHP 8.5 and newer under certain application conditions.
  • CVE-2026-129481 — a use-after-free in ext-session that can corrupt memory or crash a reusable worker. According to the vendor advisory, code execution via this particular vector has not been demonstrated. Branches 8.3–8.5 are affected.
  • CVE-2026-129496 — a use-after-free in ext-date allowing an unauthenticated remote attacker to crash workers or execute arbitrary code. It requires PHP error logging to a file and certain diagnostics on request startup. Branches 8.2–8.5 are affected.

Local privilege escalation (CVSS 8.8)

CVE-2026-129291 — a use-after-free in PHP-FPM when worker output capture (catch_workers_output) is enabled and the epoll event backend is used. An attacker who can execute code in an FPM worker can escalate privileges to the PHP-FPM master process level. This vulnerability is fundamentally different from the other seven: it is not remotely exploitable and is relevant only for specific FPM configurations. Affected versions are 8.1.20 through 8.1.34, 8.2.7 through 8.2.35, and branches 8.3–8.5 before the patches. Previously we analyzed threats to PHP-FPM in the context of the Potassium botnet.

Prioritization: which vulnerabilities to patch first

CVE-2026-129289 deserves top priority on deployments with persistent FastCGI connections. Unlike the other critical vulnerabilities, its exploitation does not require memory corruption or winning a race — it is enough that the application fails to fully read the request body from php://input. This makes the attack more reliable and reproducible.

CVE-2026-126714 (phpAfterShell) affects PHP’s standard file-based session handler — that is, the default configuration. An important detail: the recommendation to disable session.upload_progress.enabled removes only one of the entry points. According to the vendor advisory, applications that independently store attacker-controlled data in file-based sessions remain vulnerable even after this measure.

CVE-2026-129291 should be prioritized separately — only on systems with PHP-FPM where worker output capture is enabled and epoll is used. On other configurations it is not exploitable.

At the time of publication, none of the eight vulnerabilities had been added to the CISA KEV catalog, and no independent evidence of active exploitation has been found. However, the related vulnerability CVE-2026-109619 was previously added to CISA KEV, which indicates increased attacker interest in the PHP stack.

Affected versions and patches

  • PHP 8.2.36 — fixes CVE-2026-115560, CVE-2026-126714, CVE-2026-129289, CVE-2026-129496, CVE-2026-129291
  • PHP 8.3.37 — fixes all of the above plus CVE-2026-129481
  • PHP 8.4.28 — same as PHP 8.3.37
  • PHP 8.5.13 — fixes all eight CVEs, including CVE-2026-129182 and CVE-2026-129474
  • PHP 8.6.0 — according to the official changelog, released on 19 November 2026 and includes all fixes

Recommendations

  • Update PHP to the nearest patched version within your branch. For the 8.1 branch, a patch for CVE-2026-129291 is not available — consider migrating to 8.2.36 or higher.
  • Check your frontend configuration: if persistent FastCGI connections are used (nginx fastcgi_keep_conn, Apache enablereuse, HAProxy FastCGI), updating is critical because of CVE-2026-129289.
  • As a temporary risk reduction measure for CVE-2026-126714, disable session.upload_progress.enabled, but keep in mind this is not a complete mitigation — applications that store user-controlled data in file-based sessions remain at risk.
  • On FPM servers with catch_workers_output = yes and the epoll backend, prioritize updating to protect against CVE-2026-129291.
  • Consider migrating from file-based sessions to alternative backends (Redis, Memcached, databases) to reduce the attack surface associated with CVE-2026-115560, CVE-2026-126714, and CVE-2026-129481.

Eight vulnerabilities in a single release — four of them use-after-free — continue the trend we observed in the PHP2Shell series. Given that the related CVE-2026-109619 has already entered CISA KEV and the new vulnerabilities affect default configurations (file-based sessions, standard FastCGI stacks), the window for a safe update may turn out to be short. Update PHP to a patched version within your branch and review your FPM and frontend proxy configurations for the conditions described in the advisories.


CyberSecureFox Editorial Team

The CyberSecureFox Editorial Team covers cybersecurity news, vulnerabilities, malware campaigns, ransomware activity, AI security, cloud security, and vendor security advisories. Articles are prepared using official advisories, CVE/NVD data, CISA alerts, vendor publications, and public research reports. Content is reviewed before publication and updated when new information becomes available.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.