Critical PHP vulnerabilities: #
Update (November 19, 2026): This post has been updated with details from the PHP Project's security advisory, including affected versions, fixes, and mitigations.
Following the security team's November 18 pre-announcement, The PHP Project has released PHP 8.2.36, 8.3.37, 8.4.28, and 8.5.13 to address seven vulnerabilities rated critical. Each issue requires a non-default configuration, an uncommon setup, or specific application behavior to exploit:
- CVE-2026-126714 (GHSA-fm2m-fjf5-v3cp): The default files session save handler in PHP does not clear a session file before rewriting it, so an interrupted write can leave parts of two serialized sessions in the same file. An attacker who can influence session contents and interrupt a write can make PHP deserialize attacker-controlled objects, which can lead to remote code execution with a suitable gadget chain in the application. The vulnerability has been designated CVE-2026-126714 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-115560 (GHSA-658j-r8rw-q6mx): The PHP session upload progress feature can write attacker-controlled data with the php_binary or php_serialize serializer that is later read with the php serializer. A remote attacker who can submit a multipart upload can inject serialized objects, which can lead to remote code execution with a suitable gadget chain in the application. This issue is separate from CVE-2026-109619. The vulnerability has been designated CVE-2026-115560 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-129481 (GHSA-g3vh-838c-65v7): A use-after-free in the PHP session extension in PHP 8.3 and later retains a pointer to the script filename when a fatal error in an application callback interrupts session shutdown. A later request handled by the same worker can free the stale string, crashing the worker or corrupting memory. This is an incomplete fix for CVE-2026-109619. The vulnerability has been designated CVE-2026-129481 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-129182 (GHSA-2fjv-p558-g82m): A use-after-free in PHP 8.5 allows a fatal error raised while PHP restores modified INI settings during request shutdown to repopulate the stored fatal error backtrace after the executor is cleaned up. An early diagnostic in a later request handled by the same PHP-FPM or mod_php worker can then access the stale backtrace, causing memory corruption and potentially remote code execution. This is a further variant of CVE-2026-109619, which PHP 8.5.12 fixed only for the generic case. The vulnerability has been designated CVE-2026-129182 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-129474 (GHSA-8mjj-2r7p-4hg2): A use-after-free in PHP 8.5 occurs when a backtrace collects the arguments of a method handled by __call() or __callStatic(). An unauthenticated attacker can send a crafted request that causes a fatal error, such as exceeding memory_limit, as the application enters such a method, leading to remote code execution. The delayed out-of-memory handling introduced in PHP 8.5.12 as part of the CVE-2026-109618 fix makes this trigger reachable. The demonstrated attack requires fatal_error_backtraces=1 (the PHP 8.5 default) and zend.exception_ignore_args=0. The vulnerability has been designated CVE-2026-129474 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-129496 (GHSA-gr4f-wgx5-jpfv): A use-after-free in the PHP date extension retains a reference to a freed timezone cache when a diagnostic is written to a file-based PHP error log during process startup. An unauthenticated, remote attacker can trigger an early request diagnostic in a fresh PHP-FPM, mod_php, or CGI worker to crash the worker or potentially execute arbitrary code. The vulnerability has been designated CVE-2026-129496 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-129289 (GHSA-qc49-hpvq-g2w6): PHP does not discard the unread part of an HTTP request body when an application opens php://input without reading it to the end. When the front end reuses backend connections, such as nginx with fastcgi_keep_conn on or Apache mod_proxy_fcgi with enablereuse=on, an unauthenticated, remote attacker can smuggle a forged FastCGI request to PHP-FPM and execute attacker-controlled PHP code. With LSAPI, the leftover bytes can disrupt subsequent requests. The vulnerability has been designated CVE-2026-129289 and has been rated critical with a CVSS score of 9.2.
The following versions are affected
- PHP 8.2: Versions prior to 8.2.36
- PHP 8.3: Versions prior to 8.3.37
- PHP 8.4: Versions prior to 8.4.28
- PHP 8.5: Versions prior to 8.5.13
Note: CVE-2026-129182 and CVE-2026-129474 affect only PHP 8.5, and CVE-2026-129481 does not affect PHP 8.2. PHP 8.1 and earlier no longer receive updates from the PHP Project and may also be affected by some of these vulnerabilities.
What is PHP? #
PHP is a widely used open-source, general-purpose scripting language for web development. It runs web applications and content management systems, often through mod_php, PHP-FPM, or CGI.
What is the impact? #
Successful exploitation of these vulnerabilities would allow an unauthenticated, remote attacker to disrupt web application availability and, in non-default environments, potentially execute arbitrary code to achieve full unauthorized compromise of the affected server.
Are updates or workarounds available? #
Users are encouraged to update to the latest version as quickly as possible:
- PHP 8.2: Upgrade to version 8.2.36 or later.
- PHP 8.3: Upgrade to version 8.3.37 or later.
- PHP 8.4: Upgrade to version 8.4.28 or later.
- PHP 8.5: Upgrade to version 8.5.13 or later.
- PHP 8.1 and earlier: Migrate to a supported fixed release, or obtain a backported fix from your distribution or LTS vendor.
Note: Linux distributions and LTS vendors may provide updated packages separately from the PHP Project release.
Mitigation:
- Updating is the only complete mitigation. The following measures reduce exposure to specific attack paths until an update can be deployed.
- CVE-2026-126714 and CVE-2026-115560: Set session.upload_progress.enabled=0 administratively, limit untrusted data stored in sessions, and ensure that every application sharing a session store uses the same session.serialize_handler.
- CVE-2026-129481: For PHP-FPM, set pm.max_requests=1 and restart the workers, at a performance cost.
- CVE-2026-129182 and CVE-2026-129474: Set fatal_error_backtraces=0 administratively so request-specific configuration cannot re-enable it, and restart all workers. For CVE-2026-129474, setting zend.exception_ignore_args=1 also prevents the demonstrated attack.
- CVE-2026-129496: Correct configuration errors and deprecated settings that produce startup diagnostics, or send PHP errors to a destination other than a log file, such as syslog, then restart the PHP master process and all workers.
- CVE-2026-129289: Disable backend connection reuse on the front end, such as nginx fastcgi_keep_conn or Apache enablereuse, and do not expose PHP-FPM or LSAPI listeners to untrusted networks.
Finding exposed PHP installations with runZero #
From the Software Inventory, use the following query to locate systems running potentially vulnerable software:
product:=PHP OR product:=php
October 2026: CVE-2026-109618 and CVE-2026-109619 #
Update (October 27, 2026): Evidence indicates that CVE-2026-109618 and CVE-2026-109619 are actively exploited in the wild, leading to their addition to the CISA Known Exploited Vulnerabilities (KEV) catalog on October 26, 2026.
Update (October 21, 2026): This post has been updated with details from the PHP Project's security advisory, including affected versions, fixes, and mitigations.
The PHP Project has released a security update that addresses two critical vulnerabilities, collectively known as "php2shell". Both are rated CVSS 9.2 and can allow unauthenticated remote code execution:
- CVE-2026-109618: PHP handles out-of-memory (OOM) errors by exiting the current context with longjmp(), which can interrupt PHP while request data is only partially initialized. Request cleanup may then read or branch on the invalid data, allowing an unauthenticated, remote attacker to execute arbitrary code. Crafted multipart requests can trigger the condition, and with Apache mod_php it can occur before any application code runs. The vulnerability has been designated CVE-2026-109618 and has been rated critical with a CVSS score of 9.2.
- CVE-2026-109619: PHP retains global state that points to memory owned by a request. If that state is not reset before the request memory is freed, a later request handled by the same worker can use the stale state before normal initialization, allowing an unauthenticated, remote attacker to execute arbitrary code. The vulnerability has been designated CVE-2026-109619 and has been rated critical with a CVSS score of 9.2.
All PHP installations that serve web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. Applications that run on PHP, such as content management systems, e-commerce platforms, and web frameworks, may be exposed through a vulnerable PHP runtime.
The following versions are affected
- PHP 8.2: Versions prior to 8.2.35
- PHP 8.3: Versions prior to 8.3.36
- PHP 8.4: Versions prior to 8.4.27
- PHP 8.5: Versions prior to 8.5.12
Note: PHP 8.1 and earlier no longer receive updates from the PHP Project and should be considered vulnerable unless a distribution or LTS vendor has backported the fixes.
What is the impact? #
Successful exploitation of these vulnerabilities would allow an unauthenticated remote attacker to execute arbitrary code with the privileges of the underlying PHP process, potentially leading to full compromise of affected web applications and underlying server infrastructure.
Are updates or workarounds available? #
Users are encouraged to update to the latest version as quickly as possible:
- PHP 8.2: Upgrade to version 8.2.35 or later.
- PHP 8.3: Upgrade to version 8.3.36 or later.
- PHP 8.4: Upgrade to version 8.4.27 or later.
- PHP 8.5: Upgrade to version 8.5.12 or later.
- PHP 8.1 and earlier: Migrate to a supported fixed release, or obtain a backported fix from your distribution or LTS vendor.
Note: Linux distributions and LTS vendors received the patches in advance; check your vendor for updated packages. The PHP security team also provided minimal source backports for PHP 7.4, 8.0, and 8.1 for those building from source.
Mitigation:
- Updating is the only complete mitigation. The following measures reduce exposure to specific attack paths but do not make an installation safe.
- CVE-2026-109618: Set memory_limit=-1 in a way applications cannot override, set a low post_max_size, and enforce request size, multipart part, header, and nesting limits at the web server or proxy.
- CVE-2026-109619: Set session.upload_progress.enabled=0 and, on PHP 8.5, fatal_error_backtraces=0, restart all workers, and remove invalid or deprecated per-request settings that emit diagnostics before request initialization.
- Review the PHP security advisory and the linked GitHub Security Advisories for additional mitigation details.
Finding exposed PHP installations with runZero #
From the Software Inventory, use the following query to locate systems running potentially vulnerable software:
vendor:=PHP AND product:=PHP