Security

php2shell, the critical PHP vulnerability (CVE-2026-109618 and CVE-2026-109619). What to do and how to protect yourself

php2shell, the critical PHP vulnerability (CVE-2026-109618 and CVE-2026-109619). What to do and how to protect yourself

In short: on October 20, 2026 the details of two critical PHP vulnerabilities leaked. They are tracked as CVE-2026-109618 and CVE-2026-109619, and nicknamed „php2shell". Both are rated 9.2 out of 10 (CVSS 4.0) and both allow remote code execution on the server without logging in. On October 21 PHP released the fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP powers most websites, so this affects almost every site owner.

Update (October 21, 2026): the PHP patches are out

On October 21, 2026 the PHP team released emergency fixes closing the php2shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619). Update PHP as soon as possible to a patched version:

PHP branch Fixed version
8.5 8.5.12
8.4 8.4.27
8.3 8.3.36
8.2 8.2.35

What about branches outside official support (8.1, 8.0, 7.4)? PHP published minimal source backports for them (meant for people who build PHP from source or have no LTS vendor). On top of that, Linux distributions and hosting providers (for example CloudLinux) backport the fix into their own packages, so even on an older PHP version check with your host or distribution for an updated package. Moving to a supported branch (8.2 or newer) is still the best option. Updating PHP is the only complete fix, stopgaps (such as disabling session.upload_progress.enabled) reduce the risk but do not replace the patch.

In-the-wild exploitation is being reported inconsistently: some sources point to early attack attempts, others do not confirm it yet. Either way, update immediately, because exploits tend to appear very quickly.

If your site is under our care, we roll out the update right away, you do not need to do anything.

If you found this article by searching for „php2shell" or the CVE numbers, you probably already sense something serious is going on. Below we explain, in plain language, exactly what the problem is, what could happen and how to protect yourself step by step.

What is php2shell and what are CVE-2026-109618 and CVE-2026-109619

php2shell is two critical PHP vulnerabilities (CVE-2026-109618 and CVE-2026-109619) that let an attacker run code on the server remotely, without logging in, which in practice means taking over the site and the server. Both are rated 9.2 out of 10 on CVSS 4.0.

These are two separate, critical vulnerabilities in PHP itself, the software that runs on the server and „assembles" your website on every visit. The PHP security team rated both 9.2 out of 10 on CVSS 4.0, which puts them in the top, critical band.

Key facts:

  • They are RCE (Remote Code Execution) flaws, meaning they let an attacker run arbitrary code on the server.
  • The attack requires no login and no privileges on the site.
  • Details leaked before a patch existed (a zero-day situation). That is why the PHP team moved the release forward and reserved the right to ship even sooner if mass exploitation begins.
  • „php2shell" is the nickname going around among researchers. It says it all: from an HTTP request to a „shell", that is, remote control of the server.

How the flaw works and how the attack happens

In simple terms: the attacker sends a specially crafted HTTP request to the site. Instead of being handled like a normal visit, the request triggers a bug in PHP and makes the server run the attacker's commands. The result is a „shell", remote access to the system as if someone sat down at your server.

Full technical details have not been published officially yet (they are due with the patch). Early industry reporting links the issue to multipart request handling and PHP's session mechanism, and the suggested stopgap is disabling the option that tracks file upload progress. Treat that as a hint rather than a confirmed full analysis, because the official write-up is still to come.

Why is this so dangerous? Because the bug is in PHP itself, not in a single plugin or theme. PHP runs „underneath" a huge part of the internet, so one flaw in it opens the door to very many sites at once.

Who is affected

Short answer: almost anyone with a website. PHP powers, among others:

  • WordPress (that is, most sites in the world),
  • Joomla, Drupal,
  • WooCommerce, Magento, PrestaShop shops,
  • Laravel apps and many custom systems,
  • hosting control panels and tools that do not even advertise they run PHP.

According to researchers, PHP versions from 5 onward are affected. Official fixes shipped for the supported branches (8.5, 8.4, 8.3 and 8.2), and for older ones (8.1, 8.0, 7.4) PHP published minimal source backports. Those branches are outside official support, so ready-made patched packages come mainly from distributions and hosting providers. Researchers estimate over a million servers directly exposed to attack.

Does this affect my shop (WooCommerce, PrestaShop, Magento)?

Yes, and in a shop the stakes are higher, because payments and customer data flow through the site. WooCommerce runs on WordPress, while PrestaShop and Magento are separate apps, but they all rely on PHP, so a flaw in PHP itself affects them just the same. Updating plugins or WooCommerce will not secure the shop, the fix is on the server side (updating PHP). In a shop especially, back up before updating, and after switching the PHP version click through the key paths: cart, checkout and account login. For more on securing a shop, see WooCommerce, 8 things that protect your shop.

What could happen if you do nothing

If someone exploits this flaw on an unpatched server, in the worst case they can:

  • take full control of the website and the server,
  • tamper with the content of the site (spam, redirects to other sites, fake payment pages in a shop),
  • steal data, including customer data and the database contents,
  • leave a hidden „back door" (backdoor) to return even after you patch,
  • use your server to send spam or attack others, which ends with your domain on blacklists.

The consequences can be long-lasting: lost customer trust, search ranking drops after the site is flagged as unsafe, and tedious cleanup after an infection.

How to check whether your site is exposed (your PHP version)

  1. Find out which PHP version your site runs. The fastest way is your hosting panel (a „PHP" or „PHP version" section) or asking your provider. In WordPress you can also see it under „Tools → Site Health → Info".
  2. Determine whether it is a supported version. If it is an old, unsupported branch, the risk is higher, because there may be no patch for it.
  3. Check whether the site is public-facing (almost every business site is). Patch internet-facing systems first.

How to protect your site against php2shell, step by step

1. Update PHP (the only permanent fix)

As soon as your host releases patched PHP packages, install them. Public-facing sites first. Most shared hosts will apply the patch on their side or let you switch the PHP version in the panel. Watch your provider's announcements.

2. Apply temporary measures until the patch is out

This is only a stopgap to reduce risk until you can update:

  • consider disabling session.upload_progress.enabled in php.ini (a measure recommended for the pre-patch window),
  • add rules on your web application firewall (WAF), for example if you use Cloudflare,
  • limit or temporarily disable file upload features where they are not essential.

3. Cut off end-of-life PHP

If your site runs an unsupported PHP version (8.1, 8.0, 7.4), plan to upgrade the environment. In the meantime, check whether your host or distribution offers a backported package, and the safest option is to take the app off the internet or put it behind a WAF.

4. Back up before updating

Before any major change, make a website backup. If the update disturbs something, you can roll back to a working version in minutes. It also helps to know how to update a site without breaking it.

5. Turn on monitoring and detection

Set up website monitoring to catch unusual behavior quickly: sudden content changes, downtime or warnings appearing. The sooner you spot a problem, the smaller the damage.

How to change your PHP version (cPanel, Plesk, DirectAdmin)

PHP version selector in a hosting panel: update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, while PHP 8.1 and older are past official support (backports available from distributions and hosts)

On most shared hosting you can change the PHP version yourself in the panel, in a couple of minutes:

  • cPanel: open „Select PHP Version" (or „MultiPHP Manager"), pick the domain and set the newest available version in that branch.
  • Plesk: open your domain, click „PHP Settings" and choose a newer PHP version.
  • DirectAdmin: open „PHP Version Selector" (or „Select PHP Version") and pick a newer version for the domain.

If the panel does not yet list a patched version (8.5.12, 8.4.27, 8.3.36 or 8.2.35), it means your host has not rolled it out yet. Ask support to update the PHP packages urgently. After switching versions, check that the site works, and keep a backup handy in case of incompatibilities.

How to tell if you have already been breached (signs and IOCs)

Typical traces of PHP exploitation:

  • web server processes (php-fpm, php-cgi, apache2) launching shells or network tools: sh, bash, cmd, powershell, as well as curl, wget, nc,
  • reverse shell patterns in command lines: /dev/tcp/, fsockopen, mkfifo,
  • quick recon commands run „from the website": whoami, id, uname -a, ipconfig,
  • new, unknown files in the website directory (often webshells),
  • new admin accounts, unusual cron jobs, unexpected log entries.

What to do if you are a victim

  1. Isolate the server or the site to stop the attacker from doing more.
  2. Preserve the web server and PHP logs before they are overwritten. They are the evidence of what happened.
  3. Do not stop at deleting one file. Infections usually leave backdoors that bring them back. You need a proper audit of the compromised site.
  4. Restore the site from a clean backup from before the infection, then close the hole (update PHP) and change all passwords (panel, database, FTP, admin accounts).

Timeline of the php2shell vulnerability

  • October 20, 2026: details of two critical PHP vulnerabilities appear online; the post is taken down, but screenshots are already circulating. Researchers confirm the flaws are real.
  • October 20, 2026: the PHP team publishes an advance notice of an emergency security release and schedules it for October 21.
  • October 21, 2026: PHP releases the official fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35, and publishes minimal source backports for older branches (8.1, 8.0, 7.4). Distributions and hosts also ship backported packages.

Do not want to deal with this? That is what we are for

If your site is under our care, you do not need to know the CVE numbers or watch the announcements. We track them for you, check which PHP version your site runs, and roll out the update or a mitigation as soon as they are available. Monitoring flags unusual activity, and backups protect you in case of trouble.

Not sure which PHP version your site runs, or whether it is exposed? Get in touch, we will check your PHP version and secure the site before someone else gets there first. See also what our website care covers.

Sources and official advisories

Related articles

Frequently asked questions

What is php2shell?

„php2shell" is the informal name for two critical PHP vulnerabilities (CVE-2026-109618 and CVE-2026-109619) that let an attacker run code on the server remotely, without logging in. The name describes the attack: someone sends a crafted request to your site and gets a shell on the server.

What are CVE-2026-109618 and CVE-2026-109619?

They are two separate, critical PHP vulnerabilities, both rated 9.2 out of 10 on CVSS 4.0. Both allow remote code execution (RCE). Technical details leaked before a patch existed, which is why the PHP team moved the release forward.

Is my WordPress site at risk?

The flaw is in PHP, which powers WordPress, so potentially yes. Importantly, WordPress auto-updates do not close it, because the fix is on the server side (updating PHP itself). Check your PHP version with your host and install the patch as soon as it is available.

How do I protect against php2shell?

The most important step is to update PHP to a patched version as soon as your host ships it. Until then you can reduce risk temporarily (for example disable session.upload_progress.enabled in php.ini, add WAF rules), take end-of-life PHP versions off the internet and watch for unusual server activity.

I run an old, unsupported PHP version, what now?

You are not entirely out of options: PHP published minimal source backports for 8.1, 8.0 and 7.4, and Linux distributions and hosts (for example CloudLinux) backport the fix into their packages, so check with your host for an updated package. Moving to a supported version (8.2 or newer) is still best, and if you cannot do it right away, take the app off the internet or put it behind a web application firewall (WAF) until you migrate.

Is there a patch for php2shell yet, and which version should I update to?

Yes. On October 21, 2026 PHP released fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Update PHP to the matching one as soon as your host ships the patched packages. For older branches (8.1, 8.0, 7.4) PHP released minimal source backports, and distributions and hosts backport the fix into their packages, but moving to a supported version is best.

How can I tell if someone already exploited it?

Common signs are PHP processes launching shells or network tools (sh, bash, curl, wget, nc), new unknown files in the website directory, new admin accounts and unusual cron jobs. If in doubt, isolate the server and preserve the logs.

How is php2shell different from a normal plugin vulnerability?

A normal flaw sits in one plugin or theme and only affects sites that use it, and updating that add-on fixes it. php2shell is in PHP itself, the foundation every plugin and theme runs on, so it affects far more sites and is not closed by updating plugins, only by updating PHP on the server.

Related services

Free security audit

Do not wait for the site to go down

Send us your website address through the form. We will check it for threats and performance, and you get concrete recommendations plus a free security quote.

Request a free audit →

No obligation · Contact via the form · Reply within 1 business day

Looking for a fresh start? We will build your site from scratch, fast and secure. See the MP WebSolutions offer.