×
UpdatePHP Pro Log in Register
PHP expiry alert : PHP v8.1 has recently expired. Is your website still running this version? Click here for more details
SAFE versions of PHP: 8.5.12, 8.4.27, 8.3.36, 8.2.35
☰

PHP2Shell: how to check and patch CVE-2026-109618 and CVE-2026-109619

This page is updated as the situation changes. Last updated .

Update to one of these versions or newer

  • PHP 8.58.5.12
  • PHP 8.48.4.27
  • PHP 8.38.3.36
  • PHP 8.28.2.35

PHP 8.1 and every older version will not get an official fix. If your website runs one of them, read our guide to protecting a website on an unsupported PHP version.

PHP2Shell is the name given to two critical security flaws in PHP itself, tracked as CVE-2026-109618 and CVE-2026-109619. They allow an attacker who sends a specially crafted request to your website to run their own code on your web server, without needing a password or any account. The PHP project released fixed versions on 21 October 2026, and every website that runs PHP should be updated as soon as possible.

Because the flaws are in PHP rather than in WordPress, Joomla, Laravel or any other application, it does not matter which software your website uses. If your server runs PHP and answers web requests, it is affected until PHP has been updated. This guide explains how to find out whether your website is affected, how to patch it on the most common types of hosting, and what to do if you can't update straight away.

What is PHP2Shell?

PHP2Shell is a pair of serious bugs in PHP, the software that runs a large share of the world's websites. By sending your website a specially made request, an attacker can take over the server it runs on and do anything there, such as stealing data, changing pages or installing malware. Almost every PHP version from the last 14 years is affected, attacks have already been seen, and the only reliable fix is to update PHP.

Show the technical details

CVE-2026-109618: code execution after running out of memory

When PHP runs out of memory part-way through reading a request, it can be interrupted while some of its internal data is only half set up. The clean-up that follows can then treat that broken data as valid, which an attacker can use to take control of the PHP process. The PHP project rates it 9.2 out of 10 on the CVSS 4.0 scale.

CVE-2026-109619: code execution through leftover request data

Some data that belongs to one request can survive after the memory behind it has been freed. A later request handled by the same PHP worker can then use that stale data before PHP resets it, which again lets an attacker run code. It also has a CVSS 4.0 score of 9.2.

Both flaws affect every common way of running PHP on a web server, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP project says the risk is highest for Apache with mod_php, where a working exploit needs only a single request and runs before any of your website's own code is reached. PHP versions from 5.4 (released in 2012) up to 8.5.11 are affected.

Security researchers recorded attempts to exploit the flaws before they were made public, and several have since reported further attempted attacks. Government agencies including CISA in the United States and the UK's National Cyber Security Centre have told organisations to update immediately, and to take websites offline if they can't.

Is my website affected?

Your website is affected if it runs any PHP version older than the fixed version for its branch. Find your branch (the first two numbers of your version) in the table below.

PHP branchAffected versionsFixed in
PHP 8.58.5.0 to 8.5.118.5.12
PHP 8.48.4.0 to 8.4.268.4.27
PHP 8.38.3.0 to 8.3.358.3.36
PHP 8.28.2.0 to 8.2.348.2.35
PHP 5.4 to 8.1Every releaseNo official fix

The quickest way to find your version is to run our free PHP version checker, which now tells you whether the version it finds includes the PHP2Shell fix. Many servers hide their PHP version, so if the checker can't see it, our guide to finding your website's PHP version shows other ways to look it up.

If your server uses PHP packages from Ubuntu, Debian, Red Hat, CloudLinux or cPanel, the version number may not change when the fix is installed. These vendors often copy security fixes into their existing version (this is called backporting), so a version such as 8.1.2-1ubuntu2.20 can be safe even though it looks old. Check your vendor's security notice for CVE-2026-109618 and CVE-2026-109619 to confirm, using the links in the patching steps below.

Check my website's PHP version

How to patch PHP2Shell on shared or managed hosting

If a hosting company looks after your server, it is responsible for installing the fixed PHP packages, and most large hosts have already done so. Even so, you should check rather than assume, because many hosts let each website choose its own PHP version and older versions may not have been patched.

  1. Find the PHP version your website uses in your hosting control panel. Our guide to finding your PHP version in a control panel shows where to look in cPanel, Plesk and other panels.
  2. If you're on PHP 8.2 or newer, check your host's status page or news for a PHP2Shell notice. cPanel (EasyApache's ea-php packages) and CloudLinux (alt-php packages) released fixed builds on 22 and 23 October.
  3. If you're on PHP 8.1 or older, switch your website to PHP 8.3 or 8.4 if your host offers it, following our guide to changing your PHP version in a control panel. Back up your website first, as a large jump in PHP version can break older code.
  4. If you can't tell whether you're protected, open a support ticket and ask your host directly whether the PHP version your website uses includes the fixes for CVE-2026-109618 and CVE-2026-109619.

How to patch PHP2Shell on your own server

If you manage your own VPS or dedicated server, install your operating system's updated PHP packages and then restart every PHP process. Restarting matters: the old, vulnerable code keeps running in PHP-FPM workers and Apache processes until they are restarted.

Ubuntu and Debian

Update the package list, upgrade every installed PHP package, then restart PHP-FPM and your web server:

sudo apt update sudo apt install --only-upgrade 'php*' sudo systemctl restart 'php*-fpm' apache2

If you installed PHP from Ondřej Surý's repository (ppa:ondrej/php or packages.sury.org), the same commands pick up his patched builds. Check the status of your release on the Ubuntu CVE tracker or the Debian security tracker. Our Ubuntu guide and Debian guide cover moving to a newer PHP branch.

Red Hat, AlmaLinux, Rocky Linux and Fedora

Upgrade the PHP packages with dnf, then restart PHP-FPM and your web server:

sudo dnf upgrade 'php*' sudo systemctl restart php-fpm httpd

Red Hat lists its fixed packages on its CVE page. If you use the Remi repository, make sure it has published patched builds for your version before relying on it, as it had not on the day of the release. See our Red Hat, Fedora and CentOS guide for more detail.

Windows servers

Download the fixed build for your branch from php.net, replace your PHP folder with it (keeping your php.ini), and restart IIS or your web server. Our Windows guide walks through each step.

Docker and containers

The official php images are rebuilt when PHP releases a fix. Pull the latest image for your tag, rebuild every image based on it and redeploy your containers. Running containers keep the old version until they are replaced.

docker pull php:8.4-fpm docker compose build --pull docker compose up -d

Once you've updated, confirm that the new version is the one actually serving your website, because a server can have several PHP versions installed. Running php -v only shows the command-line version, so also check a phpinfo() page or run our online checker again.

If you can't patch straight away

The PHP project is clear that updating is the only complete fix. The steps below reduce the risk while you arrange an update, but they do not make a server safe and should only be used for as short a time as possible.

If your website runs PHP 8.1 or older

PHP 8.1 stopped receiving security updates at the end of 2025, and PHP 8.0, 7.4 and earlier stopped years before that. The PHP project has published source code patches for 7.4, 8.0 and 8.1, but no ready-to-install versions, and nothing at all for anything older. Some Linux distributions and paid long-term support vendors have built fixed packages for older versions, so the right move depends on how your server gets PHP. Our guide to protecting a website on an unsupported PHP version explains each option and how to plan the move to a supported version.

After patching: check that you weren't attacked

Attacks started before the fix was released, so a website that was online and unpatched may already have been broken into. The UK's National Cyber Security Centre has urged organisations to check for backdoors, which can survive an update. After patching, it is worth spending a few minutes on these checks:

If you find anything suspicious, our guide to what a hacked PHP website does to your Google rankings covers cleaning up and getting search warnings removed.

How many websites are still exposed?

Since 21 October 2026, our free checker has been used on 732 different websites. 138 of them showed which PHP version they run, and these are the results for those websites. Each website is counted once, using its most recent check.

58%are still running a vulnerable version of PHP, including 45% on versions that will never get an official fix.
3%use a Linux distribution's PHP build, which may have a backported fix that the version number doesn't show.
39%are running a version of PHP that includes the PHP2Shell fix.

These figures update every hour. They only cover websites that people chose to check with our tool, so they are not a random sample of the web, but they show how quickly fixes are reaching real websites. Journalists and researchers are welcome to quote them with a link to this page.

Timeline and updates

  1. We added a PHP2Shell result to our free version checker and published this guide.

  2. The PHP project published a related advisory about session upload progress (CVE-2026-115560). Its fix is the same session.upload_progress.enabled=0 setting, so servers that already use that workaround don't need to do anything else for this advisory.

  3. cPanel and CloudLinux published fixed PHP packages for their platforms, including older PHP branches.

  4. The PHP project released PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 with fixes for both flaws, along with source patches for PHP 7.4, 8.0 and 8.1. CISA and other national cyber security agencies told organisations to patch immediately. Cloudflare deployed firewall rules for all customers, and Google reminded website owners to use a 503 status code if they take their websites offline to patch. Security firm watchTowr reported attacks against its honeypot servers the same day.

  5. The PHP project announced an urgent security release for the following day. Details of the flaws leaked online before the release.

  6. Amazon's threat intelligence team recorded an attempt to exploit the flaws, four days before they were made public.

Official advisories and sources

You can see every security fix the PHP project has published, with its severity, on our PHP security advisories page.

Hear about the next one first

PHP2Shell won't be the last serious PHP security problem. Sign up for our free alerts and we will email you whenever a new PHP security release comes out, so you can patch before attackers get going.

UpdatePHP Site Manager

Get new PHP release alerts and keep your websites up to date

Create a free Site Manager account and we will email you as soon as a new version of PHP or a security fix is released. You can also add your websites, and Site Manager will show you which of them need updating.

  • We email you whenever a new version of PHP or a security release comes out.
  • You can add your websites and see which version of PHP each one is running.
  • We remind you before a version of PHP that you use stops receiving security fixes.

30-day free trial Every new account starts with a 30-day free trial of all Site Manager features, and you don't need a card to sign up.

Find out more about Site Manager

At least 8 characters, with a letter and a number.

  • Email me whenever a new version of PHP is released.

Already have an account? Log in

Do you only want the email alerts? You can subscribe with just your email address.

We will email you whenever a new version of PHP is released, and you can create a Site Manager account later if you change your mind.

  • I confirm that I agree to the terms and conditions of service and that UpdatePHP.com may use my email address to send alert notifications and update me of future services.
Back to PHP Security Alerts
Article last updated: 25th October, 2026