PHP2Shell: the critical PHP flaw and what site owners must do now
If your website runs on PHP, and that includes WordPress, WooCommerce, Joomla, Laravel and most shared hosting, it needs checking this week. On 21 October 2026 the PHP project fixed two critical vulnerabilities now known together as PHP2Shell. They let an attacker run their own code on the server without logging in. On 26 October the US agency CISA added both to its catalogue of vulnerabilities that are already being exploited.
This piece explains in plain terms what happened, how to tell in about 15 minutes whether your site is affected, and what to do if you cannot update right away.
What happened, in plain language
PHP is the language a server uses to build a page before sending it to the browser. The two bugs (CVE-2026-109618 and CVE-2026-109619) are not in a CMS or a plugin; they are in PHP itself. So it does not matter how carefully your site was built: the runtime underneath it is the weak point.
Both bugs are about memory. The first triggers when PHP runs out of its memory allowance while parsing a request and leaves request data half initialised. The second involves state left over from an earlier request after its memory has already been freed, which a later request to the same worker can stumble on. An attacker shapes their requests so that their own code runs at that moment.
What matters for a business owner:
- No login is required. The attack arrives as ordinary HTTP requests.
- Every way of running PHP on the web is in scope: Apache with mod_php, PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. The PHP developers rate mod_php as the highest risk, since a full server takeover was demonstrated there with default settings.
- For PHP-FPM, the advisory does not include a complete working exploit, but the developers consider it vulnerable based on code analysis. That is not a reason to wait.
- Attacks are real. Being listed in KEV means CISA has evidence of exploitation in the wild. US federal agencies were given three days, until 29 October, to fix it.
Which versions are safe
Fixes shipped for every branch the PHP project still supports:
| PHP branch | Safe version (or later) | PHP project support |
|---|---|---|
| 8.5 | 8.5.12 | until 31 Dec 2029 |
| 8.4 | 8.4.27 | until 31 Dec 2028 |
| 8.3 | 8.3.36 | security only, until 31 Dec 2027 |
| 8.2 | 8.2.35 | security only, until 31 Dec 2026 |
| 8.1 and older | no official release | unsupported |
Support dates come from the supported versions page on php.net. Note that 8.2, even once patched, stops receiving fixes in under two months.
For 8.1 and earlier, CISA is blunt: if a system cannot be updated, take it offline until it can. The PHP project’s announcement adds that some Linux distributions and long-term support vendors ship their own patches for older branches, so it is worth asking your provider.
How many sites are still on old versions
According to W3Techs on 9 November 2026, PHP powers 69.0% of websites whose server-side language is known. Here is how they split by major version:
- PHP 8 66,6 %
- PHP 7 25,8 %
- PHP 5 7,5 %
- PHP 4 0,1 %
Source: W3Techs, Usage statistics of PHP for websites, 9 Nov 2026
A third of PHP sites still run version 7 or older, which the PHP project no longer updates. The “PHP 8” bar also includes 8.0 and 8.1, both unsupported. Our own estimate, not a measured figure: among small business sites the share of outdated versions is probably higher, because nobody touches them for years after launch.
How to check your site in 15 minutes
You do not need to be a developer to answer the key question: which PHP version are you running?
- Hosting control panel. cPanel, Plesk and similar panels have a “PHP version” or “PHP Selector” section showing the branch selected for your domain.
- CMS dashboard. In WordPress, the Site Health screen under Tools shows the exact PHP version.
- Compare with the table. Both the branch (8.3) and the patch number (8.3.36 or higher) matter.
- On your own server (VPS), run
php -vand check packages with your distribution’s package manager. Distributions often backport the fix without changing the version number, so go by their security notices. - Ask your host in writing whether fixes for CVE-2026-109618 and CVE-2026-109619 are installed. A decent host will give a specific answer.
In practice, two situations come up most often. In the first, the host updated PHP long ago, but your site is pinned to an old branch in the panel because a new PHP version “once broke a plugin”. In the second, the site lives on a VPS set up by a former contractor, and nobody knows who is responsible for updates.
What to do, step by step
- 1Inventoryevery site, subdomain, staging copy and tool with PHP bundled inside
- 2Updateinternet-facing systems first, to 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12
- 3If you cannot updatetake the site offline or put a WAF in front, and plan the upgrade
- 4Check for compromisenew files, new admins, odd behaviour of PHP processes
Source: CISA recommendations and php-src advisories; step wording is ours
1. List everything that runs on PHP. CISA specifically mentions software with PHP bundled inside it. For a small business that usually means the main site, an old landing page from a past ad campaign, a staging copy on a subdomain and some forgotten admin panel. We see forgotten copies as the biggest risk: nobody patches them and nobody would notice a breach.
2. Update whatever faces the internet. If you are already on 8.2 to 8.5, moving to the patched release within the same branch rarely breaks anything. Going from PHP 7.4 to 8.x is harder, since old plugins and themes may stop working. Our advice: take a backup, test the site on a copy with the new version, then switch the live one.
3. If you cannot update quickly. The php-src advisories list temporary settings for administrators, such as turning off session.upload_progress.enabled, and on PHP 8.5 also fatal_error_backtraces. The PHP developers are clear, though, that only updating fully protects you; these settings close individual attack paths. CISA adds that a web application firewall (WAF) may offer some protection in the meantime. For 8.1 and older, the agency’s position is stricter: take the system offline.
4. Check whether you were already breached. Your site could have been targeted before you installed the update. CISA suggests watching for PHP worker processes that launch a shell or download tools. For a typical website we would add:
- new or modified PHP files in upload and cache folders;
- unknown administrator accounts in the CMS;
- a changed
.htaccess, new redirects, pages with links you did not add; - complaints from your host about spam sending or load spikes.
If you find any of this, updating is not enough. You will need a clean-up, new passwords and access keys, and most likely a restore from a clean backup.
If you have to take the site offline
An offline site loses leads, and doing it the wrong way can also hurt your Google rankings. Google’s documentation recommends that during an urgent shutdown you serve a short informational page with HTTP status 503 and a Retry-After header, rather than a 404 or 500 error. That approach is meant for a day or two. Your robots.txt file should stay reachable and must not return 503.
One addition from us: it is simpler to serve that holding page from your CDN or web server than through PHP. That way the vulnerable code does not run at all while you update.
What this means for a small business
PHP2Shell is neither the first nor the last story like this. The lesson is not that PHP is bad; plenty of large, well-defended projects run on it. The lesson is that a website with nobody responsible for updates becomes vulnerable sooner or later.
A few rules we recommend putting in place:
- your contract with the host or developer should state who installs critical updates and how fast;
- check the PHP version at least once a quarter, not only when something breaks;
- keep backups away from the server and test them by actually restoring one;
- never pin an old PHP branch “for good” to keep one plugin alive; replace the plugin.
If nobody on your side looks after this, consider ongoing website support: updates, backups and monitoring cost less than recovering from a breach.
What to do next
- Today: find the exact PHP version on each of your sites and compare it with the table.
- This week: update anything below 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12, or get written confirmation from your host that the patches are installed.
- Sites on PHP 8.1 or older: plan the move to a supported branch and limit access to them until then.
- Check for signs of compromise, even if you have already updated.
Not sure which version your site runs or whether it is clean? Get in touch: we will review the setup and tell you what to fix first.
Author: Sergey Filatyev, founder of the Veb-Dev web studio.
Tags
- PHP2Shell
- PHP vulnerability
- website security
- PHP update
- WordPress
- web hosting
- CISA