News Security & Bugs

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 Fix Two Critical Remote Code Execution Bugs

PHP released security updates on 21 October 2026 for two vulnerabilities rated 9.2 that can let an unauthenticated attacker run code on a web server. A third, lower-risk issue still has no fix. Here is what is affected and what to do.

The PHP project published security releases for every supported branch on 21 October 2026. They fix two vulnerabilities, CVE-2026-109618 and CVE-2026-109619, which the PHP security team rates 9.2 out of 10 (CVSS v4.0). Both can lead to remote code execution without authentication. Security vendors refer to the pair as "php2shell".

If you run PHP on a server that is reachable from the internet, update now and restart every PHP worker. The details below are taken from the PHP announcement, the CERT-EU advisory and Tenable's FAQ, all linked at the end.

Fixed versions

BranchUpdate toStatus
PHP 8.58.5.12Supported
PHP 8.48.4.27Supported
PHP 8.38.3.36Supported
PHP 8.28.2.35Supported until 31 December 2026
PHP 8.1, 8.0, 7.4No releaseEnd of life. The PHP team published source-only backports on GitHub; some distributions and long-term-support vendors ship their own patched packages.

Every version before the ones in the table is affected. If your PHP comes from your Linux distribution or a hosting control panel, install that vendor's update rather than comparing version numbers: distributions often backport fixes without changing the upstream version.

What the two bugs are

CVE-2026-109618: memory corruption when a request runs out of memory

According to PHP's advisory, hitting the memory limit can interrupt PHP while internal request data is only partly set up. The clean-up that follows then treats that incomplete data as valid. The advisory lists all web server APIs as affected, including PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed, and names mod_php as the highest risk.

CVE-2026-109619: stale state reused by the next request

Here, internal state belonging to one request can survive after its memory has been freed, and a later request handled by the same worker process may use it. That makes it a problem for setups with long-lived workers, which is the normal way to run PHP-FPM and mod_php. PHP confirmed two ways to reach it: session upload progress (session.upload_progress.enabled) and, on PHP 8.5, fatal error backtraces (fatal_error_backtraces). The advisory says other variants may exist.

Is it being exploited?

PHP's own advisory does not say. Tenable's FAQ, last updated on 28 October, collects reports from other organisations: Amazon's threat intelligence team saw an attempt against a honeypot on 17 October, before the fix was public, and later described broad exploitation attempts; Trail of Bits said on 26 October that working exploits exist for unpatched PHP 8.2 to 8.5; and the US agency CISA added both CVEs to its Known Exploited Vulnerabilities catalogue on 26 October. Tenable notes that it has not verified every claim itself.

What to do

  1. Update PHP to the fixed version of your branch, or install your distribution's patched package. PHP says updating is the only complete fix.
  2. Restart every PHP worker afterwards: PHP-FPM, Apache, and anything else that keeps PHP loaded. Installing the package does not replace processes that are already running.
  3. Check what else bundles PHP. Appliances and control panels may ship their own copy. CERT-EU points to a list maintained by the Dutch NCSC.
  4. Still on PHP 8.1 or older? There is no official release. Ask your distribution or vendor for a patched package, or plan the move to a supported branch.

If you cannot update yet

PHP lists settings that reduce the exposure. It is explicit that they do not make an installation safe.

  • For CVE-2026-109618: set memory_limit=-1 where applications cannot override it (for example php_admin_value in the FPM pool), keep post_max_size small (8M without uploads, 32M with) with upload_max_filesize below it, enforce request size limits at the web server or proxy, and cap memory with a container or cgroup limit instead.
  • For CVE-2026-109619: set session.upload_progress.enabled=0 in php.ini, the FPM pool or the server configuration (not with ini_set() or .user.ini), and on PHP 8.5 also fatal_error_backtraces=0. Restart every worker.

A third issue is still waiting for a fix

On 23 October PHP disclosed CVE-2026-115560, another possible remote code execution bug in session upload progress. PHP calls it unlikely to be reachable: the application has to configure session.serialize_handler as php_binary or php_serialize, switch it to php at runtime before starting the session, and still have upload progress enabled.

The fix is planned for the next regular PHP release. When this article was written, on 16 November 2026, the php.net news archive showed no stable release after 21 October. Until one arrives, the mitigation is the same setting as above: session.upload_progress.enabled=0, followed by a restart of the workers. Turning it off removes the upload progress information that some upload forms read from the session; file uploads themselves keep working.

One side effect to know about

Tenable reports a regression in 8.4.27 and 8.5.12 that can crash applications using SimpleXML. It comes from an unrelated fix in the same releases, not from the security patches, and a correction had been merged but not released as of 26 October. If you see crashes after updating, check that before rolling back: going back to an older version reopens both vulnerabilities.

Sources

Share story:

Continue reading other guides on How VPS.