Websites

PHP "php2shell" vulnerabilities: what happened and what to do now

Two critical PHP flaws (CVE-2026-109618 and CVE-2026-109619) let attackers run code on servers without logging in. Here is what happened, how to check your site, and exactly what to do.

Blue PHP elephant mascot sitting on a laptop showing code
In this article 11 sections
  1. What happened, day by day
  2. The flaws in plain English
  3. Is my website affected?
  4. How to check your PHP version in two minutes
  5. What to do now
  6. 1. On shared or managed hosting (most small businesses)
  7. 2. On your own VPS or cloud server
  8. 3. If you truly cannot update today (server admins only)
  9. Could my site already be hacked?
  10. The bigger lesson: old PHP is a business risk
  11. Sources

In short: on 21 October 2026 PHP released emergency security updates for two critical flaws, now nicknamed "php2shell" (CVE-2026-109618 and CVE-2026-109619). Both are rated 9.2 out of 10 and can let an attacker run their own code on a server without logging in. If your website runs on PHP (that includes WordPress, WooCommerce, Laravel, Drupal, Magento and most shared hosting) the server needs to be on PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or newer. Updating WordPress or your plugins does not fix it; the PHP version on the server has to change.

This guide explains what happened in plain English, how to check whether your site is safe, and exactly what to do, whether you are on shared hosting, managed WordPress or your own server. It reflects what was public on 24 October 2026; we will update it as PHP publishes more details.

Laptop screen showing website code
The flaws are in PHP itself, so even well-written website code can't block them. Only a PHP update can.

What happened, day by day

  • 20 October: a post on a public forum claimed two "CVSS 10" remote code execution flaws in PHP would be disclosed on 22 October. Security firm watchTowr then confirmed the leak was real and the flaws were under embargo. The same evening PHP announced an out-of-cycle security release for the next day (The Hacker News, Drupal PSA-2026-10-20).
  • 20 October: some hosts did not wait. SiteGround, for example, switched off the affected PHP functionality on all its servers before the fix was out (SiteGround).
  • 21 October: PHP shipped the fixes in 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Linux distributions had received the patches in advance (CERT-EU advisory 2026-018).
  • 21–22 October: technical details started circulating publicly, along with early proof-of-concept code. watchTowr and Cloudflare reported early attack attempts (Tanium). At the time of writing, neither flaw had been added to CISA's list of confirmed exploited vulnerabilities, but security teams are treating it as urgent.
  • 23 October: CERT-EU updated its advisory with a third, lower-risk flaw, CVE-2026-115560, which will be fixed in PHP's next regular release.

The flaws in plain English

You don't need to understand the internals to protect your site, but here is what is going on, based on CERT-EU's advisory:

FlawScoreWhat goes wrong
CVE-2026-1096189.2 (critical)When a request makes PHP run out of its memory limit at the wrong moment (for example while it is still reading an uploaded form), PHP's emergency exit leaves memory in a broken state. A carefully built request can turn that into running the attacker's code.
CVE-2026-1096199.2 (critical)Some internal data from one request survives after it should have been cleared (for example after a fatal error) and is reused by the next request on the same PHP worker. An attacker can abuse that leftover data to take control.
CVE-2026-115560not yet publishedA third code-execution issue. PHP says it is unlikely to be exploited and only affects unusually configured sites; it will be fixed in the next regular release.

The worrying part: a demonstrated attack needs just one request, sent before any of your website's own code runs. That means a perfectly written WordPress theme or Laravel app does not protect you. It is PHP itself that has to be fixed.

Is my website affected?

Almost certainly, if all three of these are true:

  1. Your site runs on PHP. WordPress, WooCommerce, Laravel, Drupal, Joomla, Magento, PrestaShop, OpenCart, CodeIgniter, Symfony and most "cPanel" hosting all do.
  2. It is reachable from the internet (any public website is).
  3. Its PHP version is older than the fixed versions below.
Your PHP branchSafe from versionNotes
8.58.5.12Supported until end of 2027
8.48.4.27Active support ends 31 Dec 2026
8.38.3.36Security fixes until end of 2027
8.28.2.35Security fixes end 31 Dec 2026
8.1, 8.0, 7.4 and olderNo official fixEnd of life. PHP published minimal source patches for 7.4–8.1, but there are no official releases. Upgrade.

Every common way of running PHP is affected: PHP-FPM, Apache mod_php (rated highest risk), php-cgi, LiteSpeed and FrankenPHP. Software that quietly bundles PHP, such as some control panels and appliances, may be affected too (CERT-EU).

The scale is big: in a scan on 20 October, around 884,000 internet-facing servers showed PHP 8.1 or older, versions that get no official fix (Mallory, via The Hacker News).

How to check your PHP version in two minutes

  • WordPress: go to Tools → Site Health → Info → Server and look at "PHP version".
  • cPanel / Plesk / hPanel: open "Select PHP Version" or "PHP Settings". Note that the panel often shows only 8.3, not the exact 8.3.36; ask your host if you can't see the full number.
  • Your own server: run php -v, and check the version your web server actually uses (it can differ from the command line), for example with a temporary phpinfo() page that you delete straight after.

What to do now

1. On shared or managed hosting (most small businesses)

  • Log in to your hosting panel or check your host's status page or email. Many hosts patched or mitigated on 20–21 October.
  • If you are on PHP 8.1 or older, switch to 8.3 or 8.4 in the panel today. Test the site afterwards: open the home page, a contact form and checkout if you sell online.
  • If you can't confirm the exact version, send your host a short message: "Is my server patched for CVE-2026-109618 and CVE-2026-109619 (PHP 8.x security release of 21 October)?"

2. On your own VPS or cloud server

Rows of servers with network cables in a data centre
The fix happens on the server: PHP itself has to be updated and every PHP worker restarted.
  • Update PHP from your Linux distribution's packages, then restart every PHP worker (for example php-fpm) and the web server. Old workers keep running the old code until restarted.
  • Patch internet-facing servers first, then internal ones.
  • If you use the Remi repository, PHP noted it would not have updates on release day; use your distribution's packages or build from source.
  • Running in Docker? Rebuild your images on the new official PHP image tags and redeploy. An old image stays vulnerable even if the host is patched.

3. If you truly cannot update today (server admins only)

CERT-EU lists temporary measures that lower the risk. They do not make a server safe and should only buy you hours, not weeks:

; php.ini or FPM pool (php_admin_value), then restart all workers
session.upload_progress.enabled = 0
; PHP 8.5 only
fatal_error_backtraces = 0
; keep uploads small if you can
post_max_size = 32M
upload_max_filesize = 20M

CERT-EU also suggests strict request-size and header limits at the web server or proxy, and isolating the application from the public internet until it is patched. Settings changed with ini_set() or .user.ini are not enough. A web application firewall in front of the site can help, but it is not a replacement for the update.

Could my site already be hacked?

If your server was on an old version and public between 20 October and the moment you patched, it is worth a quick look. Signs to check:

  • New or changed .php files in your website folders, especially in uploads, cache or image folders, with odd names.
  • New admin users in WordPress or your app that nobody created.
  • New scheduled tasks (cron jobs) or unknown processes started by php-fpm, apache2 or httpd.
  • Spam pages appearing in Google, redirects to strange sites, or your host warning about high CPU or outgoing email.

If you find any of these: take a copy of the logs, change all passwords and keys, restore from a clean backup made before 20 October, then patch PHP before putting the site back online.

The bigger lesson: old PHP is a business risk

The fix took minutes to apply for sites on a supported PHP version. The sites in real trouble are the ones nobody has looked after since launch: PHP 7.x or 8.0 that was never upgraded because "it still works". Those sites now have a known, critical hole and no official patch.

Two dates to put in your calendar now: PHP 8.2 stops getting security fixes on 31 December 2026, and 8.4 leaves active support the same day. If your site runs 8.2 or older, plan the move to 8.3 or newer before the new year rather than in a hurry during the next emergency.

This is exactly what ongoing website maintenance is for: keeping the server, PHP version, CMS and plugins updated, watching security advisories, testing updates before they go live and keeping clean backups ready. If you are not sure what version your site runs or who is responsible for updating it, talk to us and we'll check it for you.

Sources

Frequently asked questions

What is php2shell?

php2shell is the nickname security researchers gave to two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, fixed on 21 October 2026. Both are rated 9.2 (critical) and can let an attacker run code on a PHP server without logging in.

Which PHP versions fix php2shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or any newer version. PHP 8.1 and older are end of life and have no official fixed release, so they should be upgraded to 8.3 or newer.

Is my WordPress site affected?

If it runs on a PHP version older than the fixed versions, yes. The flaw is in PHP itself, so updating WordPress, the theme or plugins does not fix it. Check Tools → Site Health → Info → Server, and update PHP through your hosting panel or ask your host.

My host says I am on PHP 8.3. Am I safe?

Only if it is 8.3.36 or newer. Panels often show just "8.3", so ask your host to confirm the server is patched for CVE-2026-109618 and CVE-2026-109619.

Do settings changes or a firewall protect me instead of updating?

They lower the risk for a short time, but CERT-EU is clear that they do not make a server safe. Updating PHP and restarting all PHP workers is the only real fix.

Written by

Rachyet team

Web, 3D & growth studio

We design, build and grow websites and digital products for ambitious businesses. Practical notes from real projects.

Want this done for your business?

Tell us what you are building. We reply within one business day with a clear plan.

Start a project

One useful idea a month

Short, practical notes on websites, ads and SEO. No spam, unsubscribe any time.