Automate Marketing Initiatives with Salesforce Marketing Cloud Learn More
PHP2Shell Security Update Banner.

PHP2Shell (CVE-2026-109618 and CVE-2026-109619): Affected Versions, Fixes, and What to Do Now

PHP2Shell is the name given to two critical security flaws in PHP, tracked as CVE-2026-109618 and CVE-2026-109619. On a server that has not been updated, an attacker can use them to run their own code on the server, without needing a username or password.

The PHP team released emergency fixes on October 21, 2026. If your website runs on PHP, please check your PHP version and update it as soon as you can. Updating WordPress, Laravel, your theme or your plugins will not fix this problem, because the flaw is inside PHP itself.

In this guide, we explain what PHP2Shell is, which versions are affected, how to check your server, and what to do after you update.

PHP2Shell at a Glance

  • The flaws: CVE-2026-109618 and CVE-2026-109619
  • How serious: Both are rated 9.2 out of 10 (CVSS 4.0), which is critical
  • What can happen: An attacker can run code on your server remotely
  • Fixed in: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35
  • What to do: Update PHP, or install the security update from your hosting provider or Linux vendor
  • Quick workaround: If you cannot update today, set session.upload_progress.enabled to 0 (explained below)

What Is PHP2Shell?

PHP2Shell is two separate flaws in the core of PHP, the engine that runs your website code.

The first one (CVE-2026-109618) happens when PHP runs out of memory while handling a request. While cleaning up, PHP can leave its memory in a broken state, and an attacker can take advantage of that.

The second one (CVE-2026-109619) happens because some data from one visitor’s request can be left behind and then reused by the next request handled by the same PHP worker. An attacker can use this leftover data to take control.

Both flaws are in PHP itself, not in a WordPress plugin, a Laravel package or a theme. So even a well-maintained website can be at risk if the PHP version underneath it is out of date.

PHP released emergency updates on October 21, 2026. Security researchers reported attacks being attempted around the same time, and working attack code is now publicly available. This does not mean every unpatched server has been hacked, but it does mean you should not wait.

Which PHP Versions Are Affected?

Almost every PHP version that serves websites is affected. The PHP team has released fixes for the versions it still supports:

PHP VersionAffected VersionsUpdate To
PHP 8.5Anything before 8.5.128.5.12
PHP 8.4Anything before 8.4.278.4.27
PHP 8.3Anything before 8.3.368.3.36
PHP 8.2Anything before 8.2.358.2.35
PHP 8.1, 8.0, 7.x and olderAll versionsNo official fix. See the section on older PHP below.

If you use PHP 8.1 or older, the PHP team will not release a fix for your version. However, some Linux vendors, hosting companies and paid support providers do add security fixes to older versions on their own. Ask your provider or check their security notice to find out if your setup is covered.

Not sure which PHP version your website uses? Check your hosting control panel or ask your hosting provider. If you manage several websites, remember to check your live, staging and test servers too.

Why Is PHP2Shell Serious?

There are three main reasons:

  1. It is inside PHP itself. Updating your website or its plugins does not change the PHP engine underneath.
  2. It can be attacked from outside. An attacker only needs to send requests to your website. They do not need to log in first.
  3. A successful attack can reach the whole website. Code run by the attacker gets the same access as your website. That can include your files, your configuration, your database password and any API keys stored on the server.

Updating PHP closes the hole. But if someone already got in before you updated, updating alone will not remove anything they left behind.

How to Check If Your Server Is Affected

The quickest check is to run this command on your server:

php -v

Be careful: the PHP version you see on the command line is not always the version your website uses. Also check the PHP version selected in your hosting control panel, the PHP-FPM service your site runs on, or the PHP version inside your Docker container.

If you create a phpinfo() page to check the version, delete it straight away. Leaving it online shows attackers useful details about your server.

If Your PHP Came From Your Linux Distribution

Linux vendors such as Ubuntu, Debian and Red Hat often add security fixes to their PHP packages without changing the version number. So your server may show an older number and still be safe.

To be sure, look for CVE-2026-109618 and CVE-2026-109619 in your vendor’s security notice or package changelog. On Ubuntu or Debian, for example, you can run:

apt changelog php8.3

Replace php8.3 with the PHP package installed on your server. If you are not sure, ask your system administrator or hosting provider.

Do not forget staging servers, Docker images, cron jobs and any other service that uses PHP. Updating one server does not update the others.

How to Fix PHP2Shell

The exact steps depend on how PHP is installed on your server. Use the checklist below, and follow the instructions from your hosting provider or Linux vendor.

Step 1: Install the Fixed PHP Version or the Vendor Update

If you are on a supported version, update to one of these:

  • PHP 8.5.12
  • PHP 8.4.27
  • PHP 8.3.36
  • PHP 8.2.35

If your PHP comes from Linux packages, install the security update from the official repository and check that the vendor lists both CVEs as fixed.

If you are on shared or managed hosting, check your provider’s security notice or contact their support team.

If you run PHP in Docker, rebuild your image on an updated PHP base image and redeploy your containers. Updating the host server does not update PHP inside the containers.

If you built PHP from source, download the fixed version from php.net and rebuild it.

Step 2: Restart PHP

After updating, restart PHP so the new version is actually in use. Depending on your setup, this means restarting PHP-FPM, Apache (if you use mod_php), or whichever service runs PHP. Old PHP processes keep running the old code until they are restarted.

Step 3: Confirm the Fix Is Active

Check the PHP version your website is using again. If your Linux vendor adds fixes without changing the version number, check their changelog or security notice instead. For Docker, make sure the running containers were recreated from the new image. Pulling a new image does not change containers that are already running.

Step 4: Test Your Website

Open your main pages and try your key features. Check your error logs and make sure integrations, scheduled jobs and background workers are working normally.

What If You Cannot Update Straight Away?

PHP has published an official temporary workaround. Set this in your php.ini file:

session.upload_progress.enabled = 0

If you use PHP-FPM, you can set it in your pool configuration instead, so applications cannot switch it back on:

php_admin_flag[session.upload_progress.enabled] = off

Then restart PHP. This turns off a built-in PHP feature that shows file upload progress bars. Most websites do not use it, so for most sites nothing will change. If your site shows a progress bar while files upload, that bar will stop updating until you turn the setting back on.

Important: This workaround reduces the risk but does not replace the real fix. Update PHP as soon as you can. Avoid copying other workarounds from unofficial posts and forums.

Need help with a PHP upgrade? Zehntech’s web development team can review your application and plan a safe PHP upgrade. You can also contact Zehntech to talk about your needs.

What If You Run PHP 8.1 or Older?

PHP 8.1 and older versions no longer get regular updates from the PHP team, and they are affected by PHP2Shell. That does not always mean you are unprotected, because some vendors still add security fixes to the older PHP packages they look after.

If you are on an older version:

  • Check your vendor’s security notice. Find out if your exact Linux or hosting package includes fixes for both CVEs.
  • Ask your hosting provider. If they manage PHP for you, ask them to confirm whether you are protected and what they recommend.
  • Apply the temporary workaround described above while you wait.
  • Plan an upgrade. Move to a supported PHP version after testing that your website, theme, plugins and libraries work with it.

Always test the upgrade on a staging server first. Take a backup you have checked, test your application, and have a plan to roll back before you change your live website.

On October 23, 2026, two days after the PHP2Shell fixes, PHP published a notice about a third, separate flaw: CVE-2026-115560. It only affects websites with an unusual setup, where the application changes the way PHP stores session data while it is running.

Two things are important here. First, the October 21 updates do not fix this flaw. Second, PHP recommends the same setting as the PHP2Shell workaround, session.upload_progress.enabled = 0, until the fix arrives in the next regular PHP release. If you already applied this setting for PHP2Shell, keep it in place and you do not need to do anything else.

You can read the details in the official PHP news archive.

After Updating: Check for Signs of a Break-In

Updating PHP closes the hole, but it cannot tell you whether someone got in before you updated. If your server was online and unpatched, ask your administrator or security team to check for:

  • Unusual requests in your web server and PHP logs.
  • New or recently changed PHP files, especially in upload folders where code should not be.
  • Unknown processes, cron jobs, user accounts or changes to your website files.
  • Unexpected outgoing connections from the server.
  • Signs that database passwords, API keys or other secrets may have been exposed.

Finding one of these does not prove PHP2Shell was used, but it should be looked into. If you think your server was broken into, bring in your security team, isolate the server, change any passwords and keys that may have been exposed, and restore from a clean backup if needed. Keep your logs, as they will help with the investigation.

Frequently Asked Questions

What Is PHP2Shell?

PHP2Shell is the name for two critical flaws in PHP, CVE-2026-109618 and CVE-2026-109619. On an unpatched server, they can let an attacker run code remotely without logging in.

Which PHP Versions Have the Fix?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on October 21, 2026. If your PHP comes from a Linux vendor or a managed host, check whether they have added the fix to their own package.

Will Updating WordPress or Laravel Fix PHP2Shell?

No. Updating WordPress, Laravel, themes, plugins or packages does not update PHP. You need to update PHP itself or install your vendor’s security update.

Is PHP2Shell Being Used in Real Attacks?

Security researchers reported attack attempts around the time the fixes came out, and attack code is publicly available. That does not mean every unpatched server has been hacked, but unpatched servers should be updated as a priority.

Is There a Quick Workaround?

Yes. Setting session.upload_progress.enabled = 0 in php.ini and restarting PHP is PHP’s official temporary workaround. It reduces the risk, but you should still update PHP.

Why Does php -v Still Show the Old Version After I Updated?

Some Linux vendors add security fixes without changing the version number. Check your vendor’s security notice or package changelog for both CVE numbers.

Do I Need to Restart PHP After Updating?

Yes, in most cases. PHP-FPM, Apache or your containers need a restart or redeploy so the updated PHP is actually running.

Is Updating Enough If My Server Was Already Exposed?

Not always. Updating fixes the flaw, but it does not remove anything an attacker may have left behind. Check your logs and files, and look into anything unusual.

Conclusion

PHP2Shell is a reminder that keeping PHP itself up to date matters just as much as updating your website and plugins. Check every server and container where your sites run PHP, install the fixed version or your vendor’s update, restart PHP, and confirm the update is active. If you cannot update today, apply the temporary workaround and update as soon as possible.

If your server was exposed before you updated, check it for signs of a break-in. If you are on an older PHP version, confirm your vendor’s patch status and plan a tested upgrade to a supported version.

Need help checking your PHP setup? Contact Zehntech to talk about PHP maintenance and upgrade support.

About the Author

Table of Contents

Have Any Project

or Work Together?

          Success!!

          Keep an eye on your inbox for the PDF, it's on its way!

          If you don't see it in your inbox, don't forget to give your junk folder a quick peek. Just in case.



              You have successfully subscribed to the newsletter

              There was an error while trying to send your request. Please try again.

              Zehntech will use the information you provide on this form to be in touch with you and to provide updates and marketing.