Skip to content
Website security

php2shell: critical PHP vulnerability — what site owners should do

Published: 21 Oct 2026Updated: 21 Oct 2026Read: 8 minWebLift

In short

  • On 21 October 2026 PHP shipped emergency security releases for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 under CVSS v4.0.
  • They allow remote code execution without authentication. Any PHP installation that serves web requests is at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed.
  • Fixed versions: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older get no official fix from the project.
  • The only complete fix is to update PHP. The settings in the advisory only reduce the risk until you can update.
  • On shared hosting your provider updates PHP. Your job is to check that they did it, and that your site still works afterwards.

Not keen to do it yourself

We will update PHP for you from $25

A paper PHP elephant putting a plaster on a cracked server — the php2shell critical vulnerability

On Wednesday, 21 October 2026 at 14:00 UTC, the PHP team published security releases for every supported branch. A day earlier it had announced the release in advance, which it rarely does. Researchers nicknamed the pair of bugs php2shell: both lead to remote code execution, which means full control over the site.

Below is only what the official advisory on php.net confirms, plus a step-by-step guide to checking your site and what to do next.

What happened

PHP fixed two vulnerabilities rated 9.2 on the CVSS v4.0 scale. The technical details are in the advisories on GitHub.

CVE-2026-109618: corruption on out-of-memory

When PHP runs out of memory, processing can stop halfway through parsing an incoming request. The request data is left partially initialised, and the cleanup code treats it as valid. An attacker who can trigger that condition on purpose gets a path to running their own code. Advisory: GHSA-w8hw-w9fx-j79w.

CVE-2026-109619: stale state between requests

Some state owned by one request survives after its memory is freed, and a later request handled by the same worker picks it up. That is exactly how PHP-FPM and mod_php work: one worker serves request after request. Advisory: GHSA-6wmf-4rv5-p3rp.

According to researchers, a public exploit appeared before the fix, and Cloudflare reports early exploitation attempts. This is not a theoretical threat: sites on old versions are already being scanned.

Who is affected

Any PHP installation that answers web requests is at risk, whatever runs on top of it: WordPress, WooCommerce, Laravel, Drupal or a custom site. The bug is in PHP itself, not in the CMS.

  • Apache with mod_php carries the highest risk. The attack works before your application code even starts, so no security plugin will see it.
  • PHP-FPM is the most common setup on VPS and most hosting plans.
  • php-cgi, FrankenPHP and LiteSpeed (LSAPI) are on the affected list too.

The advisory does not single out command-line scripts that never receive requests from the internet. But a website usually lives on the same server.

Which PHP versions are safe

BranchFixed versionStatus
PHP 8.58.5.12supported
PHP 8.48.4.27supported
PHP 8.38.3.36supported
PHP 8.28.2.35end of life 31 Dec 2026
PHP 8.1, 8.0, 7.xno official fixunsupported
PHP 8.6RC4 (testing)release 19 Nov 2026

For 7.4, 8.0 and 8.1 the PHP team published minimal source backports, and some Linux distributions and long-term support vendors received patches in advance. There will be no official releases for these branches, though. If your site still runs PHP 7.4 or 8.0, take this as the reason to move to 8.3 or 8.4 rather than patch an old version.

A note on PHP 8.2: even at 8.2.35, the branch stops receiving security fixes on 31 December 2026. While you are touching the server anyway, it is better to move off it now.

How to check your PHP version

  1. WordPress. Go to Tools → Site Health → Info → Server. It shows the exact PHP version, for example 8.3.36.
  2. Hosting control panel. In hPanel, cPanel, Plesk and similar panels the PHP version is in the PHP settings section. Look at the full three-part number, not just "8.3".
  3. VPS or your own server. Run php -v in a terminal. The web server may use a different version from the command line, so check the one that actually serves the site too.

Do not rely on the X-Powered-By response header. If the page comes from a cache (LiteSpeed Cache, a CDN), the header may show the version the cache was built with, not the one running now.

What to do now

Shared hosting

Here the provider updates PHP, not you. Large hosts usually roll out minor updates themselves within a day or two. Your steps:

  1. Check the version as described above. You need 8.5.12, 8.4.27, 8.3.36 or 8.2.35.
  2. If it is still an old version, contact support and ask when the fixed release will be installed.
  3. If the site runs 8.1 or older, switch it to 8.3 or 8.4 in the panel. Take a backup first: old plugins and themes may not survive the jump.

VPS and your own server

Update the PHP packages with your distribution's package manager and restart every worker: PHP-FPM, Apache or LiteSpeed. Without a restart the old version stays in memory even though the files are new.

Docker containers

Official images such as php:8.3-fpm or php:8.3-cli-alpine only get the new version once they are rebuilt on Docker Hub. After that, rebuild your own image without cache (docker build --pull --no-cache) and redeploy. A running container will not update itself.

Interim mitigations if you cannot update yet

The PHP advisory lists settings that reduce the risk. None of them is a complete fix.

  • session.upload_progress.enabled=0 in php.ini, the FPM pool or the server config, then restart every worker. Setting it through .user.ini or ini_set() does not work.
  • post_max_size = 8M, or 32M if the site needs file uploads, with upload_max_filesize below it.
  • On PHP 8.5, fatal_error_backtraces=0 and a restart of the workers.
  • memory_limit=-1 via php_admin_value in the FPM pool or Apache. Use with care: it removes the memory cap for every script, so a single heavy script can eat the whole server. Make sure no other setting restores a finite limit.
  • Do not use RLIMIT_AS or RLIMIT_DATA: they can trigger the vulnerable out-of-memory path.

Signs that the site has already been compromised

If the site ran a vulnerable version, make sure it was not hit. Typical traces:

  • New PHP files in the web root, in wp-content/uploads or other folders where PHP files should never appear. These may be web shells.
  • New cron jobs you did not create.
  • New WordPress administrators or changed passwords.
  • PHP-FPM, php-cgi or Apache processes spawning a shell, curl or wget.
  • Redirects to other sites, spam pages in Google, a sudden jump in server load.

If you find any of these, do not just delete the suspicious file. Isolate the site, keep the server logs, rotate every password and key (hosting, database, admins, FTP/SSH), and restore from a clean backup or review every file.

If you found traces

The site is already hacked: a plan for the first 30 minutes

How to check a site in 15 minutes, what to do first, how to remove the malware and clear the Google warning: we walk through it step by step in my site was hacked: what to do. If there is no breach, the best protection is an up-to-date PHP version and regular updates.

Cleaning a hacked site is $50. If the site is badly damaged or there is no backup, we estimate separately and name the price before work starts.

If the site breaks after the PHP update

A patch update within one branch, such as 8.3.35 to 8.3.36, usually goes unnoticed. Moving from an old branch to a new one (7.4 or 8.1 to 8.3) is a different story: sites with outdated plugins and themes often show "There has been a critical error on this website" or a blank white page. The fix is to find the incompatible plugin or theme through the error log or WordPress recovery mode, then update or replace it. We cover what to do in a separate article: WordPress critical error after a PHP update.

We will check and update PHP on your site

  • PHP version and compromise check — free
  • PHP update on your hosting — from $25
  • Full service: backup, move to 8.3/8.4, plugin compatibility, error fixes — $50

Details on the PHP update page.

What is php2shell?

It is the nickname researchers gave to two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, fixed on 21 October 2026. Both allow unauthenticated remote code execution and are rated 9.2 under CVSS v4.0.

Is my WordPress site vulnerable?

Yes, if it runs a PHP version older than 8.5.12, 8.4.27, 8.3.36 or 8.2.35. The bug is in PHP itself, not in WordPress, so updating plugins or WordPress core does not fix it. You can see the version under Tools → Site Health → Info → Server.

Will my host update PHP for me?

On shared hosting the provider usually installs minor updates, but timing varies. Check the version yourself and contact support if it is still old. The provider will not switch you to a new branch (for example from 8.1 to 8.3); you do that in the panel.

Can I avoid updating?

No. The settings in the advisory, such as disabling session.upload_progress.enabled and limiting post_max_size, only reduce the risk until you update. Only a new PHP version fully fixes it.

My site runs PHP 7.4 or 8.1. What should I do?

There will be no official releases with the fix for those branches. The most reliable option is to move to PHP 8.3 or 8.4, after taking a backup and checking that your plugins and theme are compatible. Old code often throws a critical error after the jump.

How much does a PHP update cost?

At WebLift the version and compromise check is free. Updating PHP on your hosting starts at $25. The full service, with a backup, a move to a new branch and fixes for incompatible plugins, is $50.

We will check your site for free

Send us your site's address. We will tell you which PHP version it runs, whether there are signs of compromise and what needs to be done. We reply within 24 hours.

Check my site