Skip to main content
← Continuous Intelligence
Security · · Last updated · 4 min read · By · FEDLIN

PHP2Shell: Three Questions to Ask Whoever Runs Your Website

Is your site on PHP? Ask your host. Three questions to send this week. Beside it, a line drawing of a website window with its server and a question mark.

Short answer

PHP2Shell is a pair of flaws in PHP, the language WordPress runs on. An attacker can take over an unpatched server without a password, and attacks began as soon as the fix came out. If your site runs on PHP, ask whoever hosts it which PHP version it runs and when it was last restarted.

You picked a theme, added your pages, and the site works. Underneath it runs software you’ve probably never had to think about, and on October 20 that software turned out to have a serious hole. Checking yours takes about ten minutes.

What happened

PHP is the programming language that runs WordPress, WooCommerce, and many other website platforms. On October 20, details of two flaws in PHP, now called PHP2Shell, leaked online. Fixed versions came out the next day. Security firms began seeing attacks almost immediately, and on October 26 the federal Cybersecurity and Infrastructure Security Agency (CISA) added both flaws to its list of vulnerabilities known to be exploited.

The bug isn’t new. The code it lives in goes back to PHP 5.4, released in 2012, and two of the research teams credited with finding it say they used AI models in their work. I think we’ll see more decade-old flaws surface this way, in software nobody has looked at closely in years.

The flaws let someone send a specially crafted request to your website and run their own code on the server behind it. They don’t need a password, and on common server setups it happens before your site’s own software even loads, so a strong admin password or a security plugin doesn’t stop it.

Why a small site gets hit

Nobody has to choose your business. Automated tools sweep the internet for any server that looks like PHP and try the attack on every one. A local contractor’s site is on the same list as a national retailer’s.

What they get is the server: your contact form submissions, customer details, logins, and a place to send spam from your domain. Beyond the cleanup, that’s the kind of thing that makes a customer or partner think twice about working with you.

Does your site run on PHP?

Probably, if any of these is true:

  • It’s built on WordPress, WooCommerce, Drupal, Joomla, or Magento.
  • It’s on shared or managed hosting with a cPanel or Plesk dashboard.
  • You log in at an address ending in /wp-admin.

If you’re on a fully hosted builder like Squarespace, Wix, or Shopify, the platform patches its own servers.

The three questions to send your host

Whoever hosts your site controls which PHP it runs. Send them these today, in writing, and keep the reply:

  1. Which PHP version is my site running right now? You want to hear 8.5.12, 8.4.27, 8.3.36, 8.2.35, or newer.
  2. When was PHP restarted on that version? PHP keeps the old code in memory until it restarts, so installing the update isn’t enough on its own.
  3. Have you seen attack attempts against my site since October 20? If the answer is yes, ask what they checked and whether anything got in.

If you have a developer or an agency instead of a host, send them the same three. If nobody answers clearly, that tells you something too.

My Continuit partner Will Cooper looked at the same flaw from the business side: who’s responsible for patching, and what to do this week.

After the patch

Once the update is in place, change the passwords and keys the site uses: the database password, any connected service keys, and on WordPress, the security keys in its settings file. The flaw can expose what was in the server’s memory, so treat those as seen.

One more date to put on the calendar: PHP 8.2 stops getting security fixes on December 31, 2026. If your host says you’re on 8.2, ask when they’re moving you to 8.4 or 8.5.

If a security scan has flagged your server for running a PHP version that no longer gets fixes, the report may call it “PHP Unsupported Version Detection.” I’ve written up that finding at FEDLIN, my security firm: what it means, what PHP2Shell changes about it, and how to fix or document it. It’s in FEDLIN’s findings library.

After the patch: move off PHP

Patching closes this hole. The next PHP flaw will need the same scramble, and you’ll be back to sending your host the same three questions.

The other way out is to stop running PHP. That’s the work we do at Continuit Web: we rebuild sites on Astro and React, the stack this site runs on. Pages are built ahead of time and served as finished files, so there’s no PHP on the server and a flaw like PHP2Shell has nothing to run against.

No stack is free of flaws, ours included. Astro, React, and the tools around them get security fixes too. What a rebuild changes is how much code runs on the server each time someone visits, and with prebuilt pages that’s far less. After launch, we keep that software up to date. Your team still edits text and images themselves, and old page addresses redirect to the new ones to protect your search traffic.

A rebuild is a bigger step than a patch, and it isn’t the right call for every site. If you’re not sure, or the answers to those three questions come back vague, start with our free assessment. It takes about five questions and shows where your site needs the most help.

Ready to act on this? Start with the free Modernization Assessment, or talk to the team.

More on this topic: Protect & Optimize , the Continuit Web FAQ and how we work.

Frequently asked questions

Is my WordPress site affected?

If it runs on a PHP version older than 8.5.12, 8.4.27, 8.3.36, or 8.2.35, yes. The flaw is in PHP itself, so WordPress updates, plugins, and themes don't change it. Your host controls the PHP version, so they're the one to ask.

I built my site on Squarespace, Wix, or Shopify. Do I need to do anything?

On a fully hosted platform, the platform runs the server and patches it. Check anything you run alongside it, such as a separate blog or a form on another host.

My host says they use a firewall. Is that enough?

It helps while the update happens, and it isn't a substitute. CISA describes a web application firewall as some protection until systems are patched. The fix is the PHP update and a restart.

What if my site can't be updated right away?

CISA's advice is to take it offline until it can be, especially if it runs PHP 8.1 or older. If that isn't possible, limit who can reach it, for example with a login page in front of the whole site. A web application firewall service in front of your existing site is another stopgap, and it doesn't need a redesign; CISA says it may provide some protection until the update is done.

Can I move my site off PHP entirely?

Yes. A site rebuilt on a modern framework such as Astro serves its pages as prebuilt files, so there's no PHP on the server for a flaw like PHP2Shell to reach. Every stack still needs security updates, this one included, but far less code runs on the server. Your team can still edit text and images. It's a bigger step than a patch, and it fits best when the site needs work anyway. The patch still comes first.

Sources

Find out if AI can find you Talk to a specialist