PHP2Shell PHP vulnerability: what should you do with your website today?
Short answer: on 21 October 2026, the PHP project released emergency updates for two critical vulnerabilities, together known as PHP2Shell. They let an attacker run code without logging in on any server that uses PHP to serve web pages. That affects WordPress, but also Drupal, Joomla, Magento and Laravel. The only real fix is to update PHP itself to 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Updating WordPress or your plugins alone does not close this hole. If you run a WordPress site, ask your hosting provider today which PHP version you are on and when it was patched. If you run PHP 8.1 or older, there is no official fix and your site needs to move to a newer version.
What happened on 20 and 21 October 2026?
On 20 October 2026, the PHP project announced a critical security update for 21 October at 14:00 UTC, covering two vulnerabilities with a CVSS v4.0 score of 9.2. According to research firm Sansec, the technical details leaked the same day, and an attack tool called PHP2Shell is publicly available.
The patched versions came out on 21 October. The official advice on php.net is clear: there are no complete temporary mitigations, and updating is the only safe option. According to Tenable, Cloudflare CTO Dane Knecht said before the patch was even out that Cloudflare was seeing “early attacks”. According to VRT NWS, sites in Belgium including those of the FPS Finance, Smartschool, e-ID and several hospitals went offline as a precaution. The Centre for Cybersecurity Belgium (CCB) had not yet seen any attacks in the country at that point and advised installing the update.
Which PHP versions are affected, and what should you do for each?
PHP is the programming language that runs on the server and builds the pages of a website. According to W3Techs, as cited by Tenable, 69.3% of websites whose server language is known run on PHP. Sansec reports that every version from PHP 5.4 onwards is affected.
| PHP version | Official fix | What to do |
|---|---|---|
| 8.5 | 8.5.12 | update immediately |
| 8.4 | 8.4.27 | update immediately |
| 8.3 | 8.3.36 | update immediately |
| 8.2 | 8.2.35 | update, and plan a move: 8.2 gets no more security updates after 31 December 2026 |
| 8.1, 8.0, 7.x and older | no new release | a patched package from your hosting provider or Linux distribution, or a move to 8.3 or later |
The versions and the end date for PHP 8.2 come from the announcements on php.net. Help Net Security reports that for 7.4, 8.0 and 8.1 the PHP team only published minimal source code fixes, for those who compile PHP themselves or have nobody shipping a patched build.
Why are WordPress sites most at risk?
The flaw sits in PHP, the language WordPress runs on. Even so, WordPress sites carry the biggest risk, for three reasons that reinforce each other.
- Scale. According to W3Techs, 39.6% of all websites run on WordPress, measured on 21 October 2026. Attackers go after what is most common first.
- Outdated PHP. According to WordPress.org statistics, retrieved on 21 October 2026, around 36% of WordPress sites run on an affected PHP version of 8.1 or older. No new official release came out for those versions. More than a third of WordPress sites therefore cannot “just install the patch”.
- Nobody feels responsible. For a WordPress site on shared hosting, the hosting provider decides on PHP, the owner on WordPress and a freelancer once picked the plugins. Updating WordPress in the dashboard does nothing to the PHP version on the server.
That third point is the connection too few people are making right now. Upgrading an old site from PHP 7.4 to PHP 8.3 takes more than a click: outdated themes and plugins often stop working on a newer PHP version. Anyone who put off the update for years now has to choose between a quick emergency fix and a site that gets rebuilt.
Patchstack, a security company that specialises in WordPress, also warns of an attacker with valid UpdraftCentral keys installing backdoors on connected WordPress sites. If you use UpdraftCentral for backups, delete those keys.
Statamic and Laravel run on PHP too: what did Stuw do?
Yes, Statamic and Laravel run on PHP as well, and Sansec confirmed the vulnerability against Laravel too. Choosing a different CMS does not protect you from a flaw in the language underneath. What does make a difference is who manages the server and how quickly they respond.
Stuw builds websites in Statamic, a CMS built on Laravel. On 21 October, we installed the security update on all our clients’ websites. That is where the real difference lies: whether someone is responsible for maintenance, whatever the software. You can read more about that choice in WordPress, Webflow or Statamic: which CMS to choose.
What does this mean for impact businesses and SMEs?
Impact businesses
An impact business runs on trust. A hacked site showing spam or malware damages exactly that trust, even if no data has leaked. Ask your web partner today for written confirmation: which PHP version the site runs on, and at what time the patch was installed. Keep that answer. If you report on impact, you also need to be able to show that your own digital foundations are in order.
SMEs
For an SME, what matters most is how much work it is and what it costs if things go wrong. The work is limited if your hosting provider manages PHP: then it is one email. If your site runs on PHP 8.1 or older, the bill looks different: an upgrade with old plugins can take longer than a new site. In that case, get an estimate of what it costs to repair the site compared with having a new website built, with maintenance agreed from the start.
Going for a new site? Until 31 December 2026, you get 20% off the design and build of a new Stuw website. Mention the code WEBSITE20 in your enquiry and give your approval within the 30 days the quote is valid. Hosting and maintenance fall outside the discount, but we agree them straight away, so someone installs the next critical patch on time.
What should you do today?
- Check in your hosting control panel which PHP version your site uses. In WordPress you can also find it in Site Health, under Info and Server.
- Email your hosting provider: “Has PHP on our server been updated to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or to a patched package, and when?”
- If you run PHP 8.1 or older, ask whether your host provides a patched package. If not, plan a move to PHP 8.3 or later.
- If it cannot happen today, consider taking your site offline temporarily, as the UK’s NCSC recommends. If you use Cloudflare, switch on the managed WAF rules: according to Help Net Security they are available to all customers, including on the free plan. That buys you time against attackers but leaves the problem in place.
- Then update WordPress, your theme and your plugins as well, and remove unused plugins. That does not close this hole, but it limits the damage next time.
- If you use UpdraftCentral, delete the connection keys, as Patchstack recommends.
- Agree who will update PHP, the CMS and plugins in future, and within how many hours of a critical patch.
Frequently asked questions
Is my WordPress site safe if I update WordPress?
No, a WordPress update on its own does not make your site safe from PHP2Shell. The flaw is in PHP, the language on the server, and WordPress itself is not to blame. Your hosting provider or server administrator needs to update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install a patched package. Updating WordPress and plugins is still useful, but it is a separate step.
How do I know which PHP version my website uses?
You can find your PHP version in your hosting provider’s control panel, usually under settings or PHP configuration. In WordPress it is in Site Health, under Info and Server. Not sure? Ask whoever manages your site. A version such as 8.3.36 is patched. With a lower number, check whether your host uses a patched package.
What if my site runs on PHP 7.4 or 8.1?
If your site runs on PHP 7.4, 8.0 or 8.1, there is no new official PHP release with the fix. You have two options: a patched package from your hosting provider or Linux distribution, or a move to PHP 8.3 or later. With old themes and plugins, that move often needs adjustments, sometimes a new site.
Are Statamic and Laravel sites affected too?
Yes, Statamic and Laravel sites run on PHP and were therefore vulnerable until the update. Sansec also confirmed the vulnerability against Laravel. The difference lies in management: whoever controls the server and the PHP version can patch straight away. Stuw installed the update on 21 October for all its clients’ sites.
Should I take my website offline?
Taking your website offline makes sense if you cannot update PHP straight away. The UK’s NCSC recommends taking systems offline that cannot be patched immediately, and according to VRT NWS many Belgian organisations did so as a precaution on 21 October. If your PHP version has been updated, there is no need to go offline.
How can I tell whether my site has already been attacked?
According to Sansec and Patchstack, the signs are: unusual upload requests followed by memory errors, repeated 500 errors, abnormally large or strange session cookies, and PHP processes restarting for no reason. If you see that, or files or administrators appear that you do not recognise, have your server checked and change the passwords stored on it.
In summary
PHP2Shell is a critical flaw in PHP itself, so every PHP site needed updating on 21 October 2026, including sites on Statamic and Laravel. WordPress sites carry the biggest risk: they are the most common, more than a third run on a PHP version without an official fix, and an update in the WordPress dashboard does not solve it. So treat cybersecurity as a standing arrangement, planned before anything goes wrong. Unsure about your current site, or about web and app development with maintenance included? Request a free growth scan and we will work out together whether repairing or rebuilding is the smarter choice. If it turns out to be a new site, the code WEBSITE20 gives you 20% off until 31 December 2026.
Your website deserves more than an emergency patch
Until 31 December 2026, you get 20% off the design and build of a new website. Mention the code WEBSITE20 in your enquiry and we will look straight away at what your current site needs.
Request your quote