NewsWebsite creationPHP2Shell

PHP2Shell: why your PHP 7 or 8.1 site is exposed, and what to do now

Critical PHP vulnerability of October 2026: affected versions, how to check yours and what to do this week. The briefing for Swiss SMEs.

Mehdi B.

Co-founder · SEO & digital strategy

PHP2Shell: why your PHP 7 or 8.1 site is exposed, and what to do now
In brief

Two critical PHP vulnerabilities (CVE-2026-109618 and CVE-2026-109619), fixed on 21 October 2026, allow a server to be taken over remotely. Versions 8.2 to 8.5 have a fix to install right away. PHP 7.4, 8.0 and 8.1 will not get one: you need to migrate.

On 21 October 2026, the PHP team urgently released fixes for two very serious vulnerabilities, nicknamed PHP2Shell. PHP runs a large share of websites, including every WordPress site. The closest image: it has just been discovered that the lock on millions of front doors can be opened with a paperclip. And if your site still runs on PHP 7.4, 8.0 or 8.1, the manufacturer no longer even sells a replacement lock.

What follows explains, without jargon, what this means for your business and what to ask your provider this week.

What PHP is, and why its version matters

What your visitors see is the bodywork: the design, the photos. PHP is the engine underneath. When a customer confirms an order or sends you a message through the contact form, PHP does the work.

This engine comes in several generations, called versions (7.4, 8.1, 8.5…). Each one is maintained for a few years, then the manufacturer stops producing parts. Your 2009 car may well still run very nicely. But if a fault is discovered on its brakes tomorrow, the manufacturer will not supply a corrected part. Older versions of PHP are in that position.

What happened on 21 October

Key lock on the door of a server rack

Researchers found two flaws in PHP, registered as CVE-2026-109618 and CVE-2026-109619. Their severity is rated 9.2 out of 10. An attacker can use them to take control of your server remotely, without a password. They can then copy your customer file or redirect your visitors to a fake site.

Date (2026) What happened
August Researchers discover the flaws and quietly warn the PHP team
17 October Amazon spots a first attack attempt on its decoy servers, four days before the public announcement
21 October PHP urgently releases the fixed versions. Cloudflare starts blocking mass attacks
23 October A third, less serious flaw is disclosed. It is not yet fixed

So the attackers did not wait for the announcement. That makes sense: when a burglar learns that a lock model is faulty, he does the rounds of the neighbourhood before everyone has changed theirs.

Why PHP2Shell is unlike other vulnerabilities

Usually, a security alert targets a specific part of the site, a WordPress plugin for example. You update it and that is that, a bit like replacing a window that does not close properly. This time, the problem is in the lock on the building’s front door.

The attack happens before your site even starts. An up-to-date WordPress and a security plugin are therefore of no use here: your apartment door may be armoured, but the burglar is already in the stairwell. Researchers have in fact managed to take over WordPress, Drupal and Joomla sites this way. WordPress security best practices remain useful, but they do not replace updating PHP.

The type of hosting makes no difference either. A small hosting plan at a few francs a month is as exposed as a dedicated server.

Are you affected? Your risk, version by version

All versions of PHP released before 21 October are affected. The real question is the same as at the garage: is there still a spare part for your model?

PHP version End of official support Spare part (fix) Your situation
7.4 November 2022 No official fix Immediate danger
8.0 November 2023 No official fix Immediate danger
8.1 31 December 2025 No official fix Immediate danger
8.2 31 December 2026 8.2.35 Fixed, but plan a migration before the end of the year
8.3 31 December 2027 8.3.36 Update
8.4 31 December 2028 8.4.27 Update
8.5 31 December 2029 8.5.12 Update

Even older versions (PHP 5, 7.0 to 7.3) are in a worse position: they have accumulated years of flaws that were never repaired.

For 7.4, 8.0 and 8.1, given the severity, the PHP team has published a minimal fix that you have to compile yourself, and some hosting providers or distributions offer their own repair. That is better than nothing, but it is like a makeshift part on a car that is no longer produced: it runs today, and at the next breakdown, there may be nobody left to repair it.

How to check your site’s PHP version

You do not need technical skills to get the answer. Start with the test below: it reads what your server displays publicly.

Free test · 10 seconds

Which version of PHP does your site run on?

We visit the home page like any internet user and read what the server displays. No intrusion testing.

Many servers hide their version, which is rather a good sign. In that case, there are three ways to find it, from the simplest to the most direct:

  1. The simplest: write to your web provider or your hosting company. One line is enough: “Which version of PHP does our site run on, and is the 21 October fix installed?” A serious provider will reply within the day.
  2. If you have a WordPress site, log in to the admin area, then Tools, Site Health, Info tab, Server section.
  3. If you have access to your hosting account (Infomaniak, Hostpoint, cPanel, Plesk…), the version is usually shown in the domain settings.

Be wary of an answer such as “everything is up to date, no need to worry”. Ask for the exact version number, as you would ask your mechanic for the date of the last service rather than settle for “it runs well”. If nobody can answer you, that is already a warning sign.

What to do now, depending on your version

Technician working on the cabling of a server rack

The only real protection is to update PHP. What differs from one business to another is the amount of work involved.

PHP 8.3, 8.4 or 8.5: a simple oil change

Your provider installs the fixed version, usually without your customers noticing anything. Ask them to do it now and to confirm it to you in writing.

PHP 8.2: a roadworthiness test that expires in two months

The fix exists, so have it installed right away. But this version will no longer be maintained after 31 December 2026. Plan the move to a more recent version now, because between the holidays and the year-end accounts, December goes quickly.

PHP 7.4, 8.0 or 8.1: you need to change the engine

Here, an update is not enough. A site built for PHP 7 often does not work as is under PHP 8, in the same way that you cannot fit a new engine without touching the gearbox. Ask your provider for interim protections, then start a migration project without delay.

In every case, have someone check that nobody has already got in. The first attack attempts date from 17 October: as after a string of burglaries in the neighbourhood, you check around the house even if the door looks intact.

The 5 questions to ask your provider this week

You do not need to know the technical details. Your role is to ask the right questions and get clear answers. Copy and paste this list into an email:

  1. Which exact version of PHP does our site run on?
  2. Is the fix published on 21 October 2026 installed?
  3. If our version no longer has a fix, what interim protections have you put in place?
  4. Have you checked that there has been no intrusion since 17 October?
  5. When can we move to a PHP version that is still maintained, and at what budget?

On question 3, keep in mind that interim protections (firewall, server settings) are like bars fitted in a hurry in front of a broken window. They slow intruders down, but they do not replace the glass. Your provider will find the details of the recommended settings in the official PHP announcement.

For Swiss businesses: what the nLPD says

Since 1 September 2023, the new Federal Act on Data Protection (nLPD) requires every business to properly protect its customers’ data (art. 8). Keeping a site on a PHP version with no fix, when the flaw is known to everyone, amounts to leaving customer files in an office whose lock you know is broken. If something goes wrong, it is hard to argue that you did what was necessary.

Take an online shop: if its server is hacked, the addresses and orders of thousands of customers may leak. In that case, article 24 requires you to promptly report the incident to the Federal Data Protection and Information Commissioner (FDPIC) if the risk to the individuals concerned is high. If in any doubt, speak to your legal adviser. For the rest of your obligations, the nLPD technical checklist is the right starting point.

Fix this week, migrate this year

Our view is fairly clear-cut. If your site is on PHP 8.3 or later, it is an unpleasant moment to get through, settled in a single intervention. If it is on 7.4, 8.0 or 8.1, this flaw is the signal you have probably been putting off for a long time: your site needs to be modernised. It is not pleasant to hear, but it is better to plan this work now than to discover it the day after an intrusion.

To find out which path suits your application (a simple update, a migration or a rewrite), read our article Migrating a PHP 7 application to PHP 8. And if you are looking for a server that is maintained day to day, see our hosting and managed hosting offering.

Frequently asked questions

What is PHP2Shell?

It is the nickname given to two critical PHP vulnerabilities published on 21 October 2026, CVE-2026-109618 and CVE-2026-109619. They make it possible to run code on a server without authenticating. The PHP project does not use this name.

Is my WordPress site affected?

Yes, if it runs on an unpatched version of PHP. The flaw is in PHP, not in WordPress: updating WordPress or its plugins is not enough.

Which versions fix the flaw?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. For PHP 8.1 and earlier versions, no fixed release is published: the PHP security team has only made available a minimal fix for 7.4, 8.0 and 8.1, to be compiled yourself, and some vendors offer their own fixes.

My hosting provider says it has done the update, am I protected?

For these two flaws, yes, if it has installed the fixed version. Simply ask them to confirm in writing the version number installed and the date of the intervention.

Sources

PHPSecurityWordPress
Mehdi B.
About the authorMehdi B.

Co-founder of Smart Impact. Hooked on the web from the start, he launched his first project in 2006: an online music magazine still running today. With close to 20 years of SEO experience, a Swiss federal diploma in marketing and a solid geek streak, he turns clients' ideas, sometimes hazy ones, into concrete digital projects with his team.

LinkedIn
Further reading