Skip to content

Critical PHP vulnerabilities (CVE-2026-109618, CVE-2026-109619): what to do now

Two critical flaws in the PHP core allow unauthenticated remote code execution on every unpatched version since 5.4. How to check, how to update on a standalone or cPanel server, and what your options are if your PHP version is no longer supported.

On 21 October 2026 the PHP project released emergency fixes for two critical vulnerabilities in the PHP core. Both allow unauthenticated remote code execution: an attacker who can reach a web page served by PHP can run code on the server, with the privileges of the PHP worker account — which in practice means it can read your application’s configuration files, database credentials and API keys.

The pair has been nicknamed PHP2Shell. Against the CVSS v4.0 scale both score 9.2 (Critical). Exploit code was circulating within hours of the release and CERT-EU advises organisations to patch immediately, and to isolate internet-facing systems that cannot be patched yet.

If you run PHP, you need to update it. This article explains what the flaws are, how to check whether you are affected, and how to update — on a standalone server or on a cPanel server, with or without CloudLinux. It also covers what to do if you are still running a PHP version that nobody supports any more.

What the two vulnerabilities actually are

They are distinct bugs in the PHP interpreter itself, not in an application, a framework or a plugin. That is why the fix has to come from PHP itself rather than from a WordPress update.

  • CVE-2026-109618 — remote code execution through memory corruption during out-of-memory handling. PHP enforces the memory_limit setting by aborting a request with an internal jump. If that abort happens while request data is only partially initialised — for example while parsing a form-based file upload — the cleanup path can treat invalid data as valid and free memory that was never initialised, leaving attacker-controlled data behind. On Apache with mod_php this can be triggered by a single unauthenticated request before any application code runs.
  • CVE-2026-109619 — remote code execution through stale global state. Internal state that belongs to one request can survive after the memory backing it has been freed, for example after a fatal error. A later request handled by the same worker can then use that stale state before normal initialisation resets it.
Diagram: how CVE-2026-109618 (OOM corruption) and CVE-2026-109619 (stale global state) both lead to remote code execution
Both flaws end in the same place: code execution as the PHP worker, from a request that needs no login.

Who is affected

Every PHP installation that serves web requests, across every SAPI:

  • Apache with mod_php — the highest-risk configuration, because the exploit fires before application code.
  • PHP-FPM (the usual setup on cPanel, Plesk and most modern hosting stacks).
  • php-cgi, LiteSpeed and FrankenPHP.

The vulnerable code paths date back to PHP 5.4, released in 2012, so anything older than that is not the interesting case — everything from 5.4 onward is. The flaw class is older still: a very similar memory-corruption issue was described publicly back in 2004, which is why the vulnerability has been reported in the press as a twenty-year-old bug.

The fixed releases, published on 21 October 2026:

PHP branch Fixed version Notes
8.5 8.5.12 Best target for new deployments
8.4 8.4.27 Widely used in current hosting stacks
8.3 8.3.36 Security fixes only
8.2 8.2.35 Security support ends 31 December 2026 — plan to move to 8.3 or newer
8.1 and older no release End of life. Source patches only for 7.4, 8.0 and 8.1 — see the ELS section below

Step 1 — check which PHP version you are actually running

Before anything else, find out what you have. Do not assume the CLI version is the one your website uses: on a typical server php -v reports the command-line interpreter while the site is served by PHP-FPM or by mod_php, and the two can be different versions.

For the version your web pages really run, check one of these:

  • cPanel: MultiPHP Manager lists the PHP version assigned to each domain.
  • WHM: MultiPHP Manager in the server section, and the PHP Info page per account.
  • Anywhere else: a temporary file containing <?php phpinfo(); in the web root, read in a browser, then deleted.

On a server that hosts several sites, check every PHP version installed, not just the default. cPanel with CloudLinux will usually carry a whole family — ea-php74 through ea-php85, plus alt-php versions — and an old one left assigned to a single site is exactly the gap an attacker looks for.

Step 2 — update a standalone server

If you manage the server yourself without a control panel, you update PHP through your distribution, or by rebuilding it if you compiled it from source.

Debian and Ubuntu

Distribution packages sometimes lag the upstream release by a few days. After updating, compare php -v with the table above: if you are still below the fixed version for your branch, the package is not published yet — check your vendor’s channel or see the options below.

RHEL, AlmaLinux, Rocky Linux and other RHEL clones

Restart and confirm

Updating the packages is not enough on its own: the running processes keep the old interpreter in memory until they are restarted.

If you compiled PHP from source, rebuild from the patched release for your branch (8.5.12, 8.4.27, 8.3.36 or 8.2.35) and restart the services. For a branch that is end of life, the project published source patches for 7.4, 8.0 and 8.1 only.

Step 3 — update a cPanel server

cPanel ships PHP through EasyApache 4, and cPanel has released patched packages for ea-php74 and above, along with updated cPanel & WHM builds for the control panel’s own internal PHP.

Then verify that the installed package really contains the fix. Replace ea-php81 with each version you run:

On a Debian-based host the changelog is compressed, so use zgrep against /usr/share/doc/ea-php81-php-cli/changelog.Debian.gz.

Finally restart the services so the new interpreter is loaded, and check the version per domain in MultiPHP Manager:

If CloudLinux is installed

CloudLinux maintains its own PHP packages in addition to the cPanel ones, and has published fixed builds across its whole range — including the old branches that the PHP project no longer supports.

  • ea-php packages (cPanel EasyApache 4 on CloudLinux): fixed packages for ea-php52 through ea-php85.
  • alt-php packages (CloudLinux’s own PHP versions, used by the PHP selector): fixed packages for alt-php 5.2 – 5.6, 7.0 – 7.4 and 8.0 – 8.5 on CloudLinux 7, 8 and 9, and on CloudLinux OS for Ubuntu 22.04. On CloudLinux 10, alt-php 5.2 is in the stable channel and the other versions come from the TuxCare ELS repository.
  • Native PHP packages from the CloudLinux repositories: fixed builds for every affected version.

CloudLinux customers should also make sure Imunify360 is active with its Web Application Firewall enabled: rulesets 8.83 to 8.88 were pushed automatically and block the known exploit requests — including rule 77049357, which stops a serialised PHP object in the upload progress field. Treat this as a safety net only. A WAF rule blocks traffic that looks like the known exploit; it does not repair the interpreter.

Running an old PHP? This is where ELS matters

The PHP project supports PHP 8.2 and newer. Everything older is end of life and receives no official release at all for these vulnerabilities — for 7.4, 8.0 and 8.1 the security team published minimal source patches, and for 5.x, 7.0, 7.1, 7.2 and 7.3 nothing was published. That is a real problem, because a large part of the hosting world still runs those versions.

There are three ways out, and only one of them is a proper fix:

  1. Move the site to PHP 8.3, 8.4 or 8.5. This is the only option that ends the problem. It needs testing — old applications, themes and plugins may not run on a current PHP — which is exactly why old versions survive for years.
  2. Use a vendor that backports the fix. If you are on CloudLinux with cPanel, the fixed ea-php and alt-php packages already cover those old branches, so a simple update protects you. If you are not on CloudLinux, that is what TuxCare Extended Lifecycle Support (ELS) for PHP provides: patched packages for versions the PHP project has abandoned, delivered through a subscription, with the vendor tracking security issues for you. cPanel’s own advisory points users of PHP older than 7.4 at TuxCare ELS, and TuxCare released fixed ELS packages for alt-php, the distribution’s own PHP and PHP for Windows in this incident.
  3. Do nothing and hope. Not a strategy. Patching an unsupported branch by hand from source means you own the CVE process for that branch forever — and this will not be the last PHP advisory.

That is the honest recommendation for anyone stuck on an end-of-life version: if you can migrate, migrate. If you genuinely cannot migrate yet, ELS is the responsible stopgap — it gets you a patched interpreter now, and support when the next vulnerability lands. What it does not do is make an unsupported version a good idea indefinitely.

Interim mitigations — useful, but not a fix

PHP’s advisories list configuration changes that reduce exposure to specific attack paths. None of them close the vulnerability, and all of them should be treated as temporary until you can update:

  • Disable the session upload progress feature — session.upload_progress.enabled=0. One documented exploitation path for CVE-2026-109619 goes through it, and PHP itself suggested keeping this off until the next bugfix release (see the note on CVE-2026-115560 below).
  • Remove the memory limit — memory_limit=-1 means the out-of-memory path behind CVE-2026-109618 cannot be reached. It also removes a protection against runaway scripts, so it is a trade-off, not a free win.
  • Tighten post_max_size so oversized multipart uploads are refused before they are parsed.
  • Keep a WAF in front (Imunify360 on CloudLinux and cPanel servers) for the known exploit signatures.
  • Isolate what you cannot patch: take the site off the public internet, or restrict it by IP, until the update is applied and verified. That is the advice CERT-EU gives when patching is not immediately possible.

One more advisory, from 23 October: CVE-2026-115560

On 23 October the PHP project published an informational note about a third issue, CVE-2026-115560. It is an unlikely vector: the application must set session.serialize_handler to php_binary or php_serialize in its configuration and then switch it back to php at runtime with ini_set() before starting the session. Because that combination is rare, PHP is handling it in the regular release cycle instead of shipping another emergency release, and recommends leaving session.upload_progress.enabled=0 in place until then. If you applied that setting for CVE-2026-109619, there is nothing extra to do.

If you do not manage your own server

On managed hosting, PHP is updated by your provider, and the update is a server-level operation — there is no setting in your hosting panel that closes this vulnerability for you. Check your control panel’s PHP version for your domains and, if it is below the fixed release for its branch, open a ticket with your host and ask them when they will have applied the patched PHP packages. Hosting companies have been applying these updates since 21 October, so the answer should be short.

Sources

Last updated 1 November 2026. If your PHP version is below the fixed release for its branch, treat it as actively exploitable until you or your hosting provider update it.

Leave a reply

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

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