Web

What PHP2Shell means for your website, and ours

A PHP flaw fixed on 21 October is already being exploited. What it means for WordPress sites, what we found in the Philippines, and why ours were safe.

Elvir SejfulaiAuthor: Elvir SejfulaiOctober 23, 202610 min read

The website went up a few years ago. A freelancer built it, or a relative, or an agency you no longer work with, and it still works. Customers can read about your services, find your number and send an enquiry through the form. Nobody in the business has logged in to the back of it for a long time, because nothing has needed changing.

On 21 October the language that most such websites run on had two critical flaws fixed, and attacks had already started. Governments in Europe took their own websites offline while they caught up. What follows is what happened, what we found on Philippine websites the day after, what we did for the sites we look after, and how to decide who keeps yours patched from now on.

In short

  • PHP2Shell is two flaws in PHP, the language under WordPress and most of the web. They let a stranger run code on the server or read its memory, passwords included, and they are already being exploited.
  • Of 47 Philippine organisation websites we read the day after, 30 ran on WordPress. Eleven stated their PHP version, and seven of those were not on a fixed release.
  • Updating WordPress or its plugins does not help. The fix belongs on the server, and on most hosting plans that is the hosting company’s job.
  • Every Siite client site on PHP was updated once the fix was out, and the sites we build in Astro had nothing to patch, because no PHP runs on them.

What happened on 21 October

Two flaws underneath WordPress

PHP is the programming language a web server uses to assemble a page each time somebody opens it. WordPress, WooCommerce, Drupal and Joomla all run on it, and Wiz, one of the two research teams that found the flaws, estimates that it powers about 70 per cent of the world’s websites. On 21 October the PHP project released versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix them.

What the flaws allow is the serious part. An attacker who sends a carefully built request can make the server run instructions of their choosing, without a password or a login. Separately, Wiz showed that one of them can be used to read the server’s working memory, where passwords, login tokens and the keys a site uses for payments or email may be held. The researchers demonstrated working attacks on WordPress, Drupal and Joomla, and on a page that does nothing but print Hello World. A tidy WordPress site with every plugin updated is no safer, because the attack happens a level below it.

Almost every version is affected

Wiz found that every PHP version released in the last decade is affected, going back to 5.4. Official releases with the fix exist only for the versions the PHP project still supports, 8.2 to 8.5. For 7.4, 8.0 and 8.1 the project published source code fixes that a hosting company has to build and install itself. For 7.3 and older there is nothing. Even 8.2 is close to the end: the PHP project supports it only until 31 December 2026.

Attacks began before the fix

The details began to leak on 20 October, and the PHP team brought its release forward by a day. Amazon’s security team recorded an attempt to exploit the flaws against one of its decoy servers on 17 October, four days before the fix existed, and said afterwards that they were being broadly exploited. Cloudflare reported attack traffic aimed at its customers as well.

The flaws were found with the help of artificial intelligence, by researchers at Calif and at Wiz, who reported their findings independently. The same tools are available to attackers, so this will not be the last week like it.

What we found on Philippine websites

How we looked

We used a list we had built the day before for another article: the websites of Philippine non-profit organisations that Google Maps returned for twelve searches in nine cities, from Quezon City to Cagayan de Oro. They are a convenient sample rather than a typical one, since organisations like these are often looked after by whoever has time. On 22 October, about eighteen hours after the fix was published, we requested the home page of each one and read only what the server says about itself in reply, the same information any visitor’s browser receives. Six did not answer, and we left out one whose domain may not belong to the Philippine organisation, which left 47.

Two thirds of them run PHP

Thirty of the 47 ran on WordPress, and one more ran PHP without it. Eight were on hosted site builders, where the platform runs the servers, and four ran on technology other than PHP. For the remaining four the reply did not say.

So for 31 of the 47 sites, somebody had to apply this week’s fix to a server. The question is whether anybody at the organisation knows that it is their job, or who it belongs to instead.

Seven of eleven were not on a fixed release

Eleven of the 31 stated which version of PHP they were running. Four were on a fixed release. Three were on a supported version, but on the release before the fix. Four were on PHP 7.4, which has had no official release for years.

That is not proof that seven sites can be broken into. Some hosting companies apply fixes to older versions without changing the number they report, and some may have updated since. But anybody can read that number, including people searching for servers that have not been fixed, and a version from before the fix is an invitation to try. WordPress’s own statistics point the same way: about 36 per cent of WordPress sites still run PHP 8.1 or older.

WordPress itself was behind on four

Twenty-two of the WordPress sites displayed their WordPress version. Thirteen were on the current release and five on older branches that WordPress still patches. Four ran versions that WordPress’s own update service lists as insecure, one of them from a line released almost a decade ago. WordPress installs minor security releases automatically by default, and it published six of them between 17 July and 6 October, so a site that far behind usually has automatic updates switched off or failing, and nobody has noticed.

Why patching falls through the gaps

The site outlives the person who built it

One small organisation in the United States described its situation plainly. The website had been built before the current staff arrived, they had no idea how anything worked behind the scenes, and they could not even get WordPress to use the right administrator email address. The theme had been pirated rather than bought, so no update would ever come from its maker. The organisation still had a working website. What it no longer had was anybody who could look after it.

Two layers, and usually two different people

A WordPress site has two layers that need patching. The server layer is PHP and the software around it, and on ordinary hosting the hosting company looks after it. PHP2Shell lives there. The site layer is WordPress, the theme and the plugins, and that belongs to whoever holds the administrator login.

The site layer is where most ordinary trouble starts. Patchstack, a company that sells WordPress protection, counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025, 91 per cent of them in plugins. Almost half had no fix available when they were made public, and for the most heavily attacked ones the median time from disclosure to mass exploitation was five hours.

Sites in one account share the damage

Some businesses end up with more than one site in the same hosting account: a main site, a promotion page, an old version nobody deleted. One site owner described a single compromised WordPress site infecting every other site on the same server, including sites that were fully up to date. The most upvoted reply explained the usual cause: when every site in an account runs as the same user, a break-in to one reaches all of them. WordPress makes the same point in its hosting requirements, and suggests asking a host what it does to keep accounts apart.

What a breach costs

Customers see the warning first

When Google believes a site has been hacked it can label the search result “This site may be hacked”, and browsers can show a warning page before the site opens. For a business that asks people to enquire, book or pay, that warning appears at exactly the moment somebody is deciding whether to trust it. Google says reviews of sites hacked with spam may take up to several weeks, and that being flagged may affect the site’s search ranking for a while afterwards.

The data belongs to people who trusted you

A business website can hold more than it appears to: enquiry forms, customer names and addresses, job applications, documents customers uploaded. This month, California’s education department disclosed that a hacker had reached data on millions of students through a non-profit contractor that helps run the state’s school tests. The intrusion was found on 25 September, and it had been running since May. Four months is a long time for nobody to notice, at an organisation far larger than most businesses.

How we handled it for the sites we look after

Every PHP site was updated once the fix was out

When the PHP team announced its emergency release, we already knew which version of PHP every client site we maintain was running, and on which server. That was not luck. We keep a record of what each site runs on, precisely so that a week like this one does not start with finding out. Once the fixes were published we updated PHP on all of those sites and checked that each one still worked. Our clients did not have to do anything, ring anybody or decide anything. We set out the same account for our clients in Croatia on siite.hr the day the fix came out.

The rest of the routine is the one we describe on siite.dk: updates are our job rather than the client’s, Cloudflare sits in front of the site wherever we manage the domain, and a daily backup goes off-site so that a damaged site can be restored within minutes. Cloudflare switched on rules against these flaws for every plan with its firewall, including free ones, on 21 October, hours before the flaws were made public. It still told customers to update PHP, and so do we: those rules are a second layer, not the fix.

The Astro sites had nothing to patch

Some of the sites we build are not WordPress at all. They are static sites built with Astro, and this week we did not touch them, because there was nothing on them to update.

On a WordPress site, the server runs a program for every visit: PHP reads the database, assembles the page and sends it. Every visitor, and so every attacker, talks to that program, and PHP2Shell is an attack on it. An Astro site works the other way round. The pages are assembled once, when we publish them, and visitors receive finished HTML files from a network of servers, the way they would receive an image or a PDF. When somebody opens the site, no PHP runs, no database is queried and no code processes their request. An attack like this one has nothing to aim at.

The same logic holds beyond this flaw. A WordPress site’s security depends on PHP, the server, the database, WordPress itself, the theme and every plugin, and each needs updating. On a static site most of that list does not exist. This website, siite.ph, is built in Astro for the same reason.

What a static site does not fix

No website is impossible to attack. A static site still has a domain, name server settings, a contact form and scripts such as analytics, and those still need looking after. The difference is how many doors are open, and for how long. A static site is also not the right answer for everything: an online shop with a large catalogue is better on a platform such as Shopify, which looks after its own servers, and an organisation that edits its site every day may be better served by a WordPress site that somebody maintains properly. On our website service we choose between the two with the client at the start, and for a business whose website presents its services and brings in enquiries, the static option usually has less to go wrong.

If your site runs PHP and somebody else looks after it

Today

Find out which PHP version the site runs. In WordPress it is under Tools, then Site Health, then Info, then Server, and most hosting panels show it too. On the 8.2 to 8.5 lines, check that it is at or above 8.2.35, 8.3.36, 8.4.27 or 8.5.12. On 8.1 or older, ask the hosting company whether it has installed the source code fix, and when the site moves to a supported version. Ask in writing, so the answer is on record.

This week

If the site ran on an unpatched version at any point after 17 October, look for files, administrator accounts and scheduled tasks nobody recognises, and change the WordPress administrator and database passwords and any keys the site uses for payments or email. Then write down who is responsible for each layer: the hosting company for the server, and one named person or provider for WordPress, the theme and the plugins. Remove the logins of people who have left, and delete plugins and themes nobody uses.

Before the next one

Make sure a recent backup exists outside the hosting account, and that somebody other than the person who made it knows where it is. Then decide honestly whether somebody in-house can keep up with PHP, WordPress, the theme and every plugin, or whether the site should be looked after by people who do it every week, or rebuilt with less to look after. Our article on what free hosting actually costs covers what to ask a host. If nobody in the business can say what the site runs on or who maintains it, that is already the answer to whether something should change.

Questions we get

Common questions

Does the PHP2Shell flaw affect WordPress websites?

Yes, unless the server has already been updated. PHP2Shell is the name given to two flaws in PHP itself, the language every WordPress site runs on, and the researchers who found them showed working attacks against WordPress, Drupal and Joomla. The PHP project fixed them in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on 21 October 2026. On most hosting plans the hosting company applies that update, so ask yours, in writing, whether it has.

Does updating WordPress or its plugins protect us from PHP2Shell?

No. The flaws are in PHP, underneath WordPress, and WordPress says no WordPress update is required or planned for them. A security plugin does not see the attack either, because it happens before WordPress runs. Keep WordPress and its plugins updated for their own reasons, but for this flaw the only complete fix is a patched version of PHP on the server.

How do I check which PHP version our website runs?

In WordPress, open Tools, then Site Health, then the Info tab, and look under Server. Most hosting control panels show the PHP version as well. A version on the 8.2, 8.3, 8.4 or 8.5 line is fixed only if it is at or above the releases of 21 October 2026. Anything older than 8.2 no longer receives new releases from the PHP project.

Our website runs on PHP 7.4. What should we do?

Ask your hosting company in writing whether it has applied a fix to your version, and when the site will move to a supported one. The PHP project published source code fixes for 7.4, 8.0 and 8.1 that a host can build and install, but there is no official release for them, and nothing at all for 7.3 and older. Moving to a supported version often means updating an old theme and plugins too, so test it on a copy of the site first.

Should we change our passwords after PHP2Shell?

If the site ran on an unpatched version of PHP after 17 October 2026, yes. That is when the first attempt to exploit the flaws was recorded, four days before the fix. One of the flaws lets an attacker read the server's memory, which can hold passwords, login tokens and API keys. Change the WordPress administrator and database passwords, and the keys the site uses for payments or sending email.

Why is a static Astro website not affected?

Because no PHP runs on it. An Astro site is assembled once, when it is published, and visitors receive finished HTML files, the way they would receive an image or a PDF. Nothing on the server processes the visitor's request, so there is no program for an attack like PHP2Shell to overload and no memory to read passwords from.

How would we know if our website has been hacked?

Often from somebody else. Google can label a result as This site may be hacked, and browsers can show a warning page before your site opens. If the site is verified in Google Search Console, Google can send an email and lists the problem in its Security Issues report. On the server, new or unfamiliar files, administrator accounts nobody created and unexpected scheduled tasks are the usual signs.
No-obligation advice

Ready to grow your business?

Send us a message. We review your website, ads, SEO and reviews, then send you a written plan, whether you hire us or not.

or call +63 2 5323 8174