8 min read

PHP2Shell: is your website affected, and how to fix it today.

Two critical flaws in PHP, the software behind most websites, let attackers take over unpatched servers. Here's what happened, whether it affects you, and the one question to ask your hosting company this week.

Web
PHP2Shell: is your website affected, and how to fix it today.

Picture a small guesthouse in Thassos at the end of the season. The owner gets a text from her web designer: "Has your host patched PHP yet?" She has no idea what PHP is. But her booking page, her photo gallery and her contact form all run on WordPress, and WordPress runs on PHP.

It's a good question. On 21 October 2026, government, school and hospital websites in several European countries were switched off on purpose while their operators fixed two flaws in PHP known as PHP2Shell. If your site runs on PHP, the fix is simple, but it probably isn't one you can install yourself.

What happened, in plain words

PHP is the programming language that builds web pages on the server before they reach your visitor's browser. According to W3Techs figures quoted by Reuters, it runs nearly 70% of websites whose language can be identified. That includes WordPress, which powers about 40% of all websites.

On 21 October, the PHP team released emergency updates for two flaws, tracked as CVE-2026-109618 and CVE-2026-109619. A CVE is just the public ID number of a known security flaw. PHP says both can allow unauthenticated remote code execution.

In plain English: a stranger on the internet, with no password, could send your server a crafted request and make it run their own commands. From there, they could steal data, change your site or plant malware.

Three things made this one unusual. The bugs had sat in PHP's code for over a decade before researchers found them with help from AI tools. Details leaked before the fix was ready. And Amazon says its decoy servers logged an attack attempt on 17 October, four days before the public announcement.

Why updating WordPress won't fix it

Think of PHP as the engine and WordPress as the car built around it. PHP2Shell is a fault in the engine. Updating WordPress, your theme or your plugins works on the bodywork, not the engine.

That's why Wordfence, a popular WordPress security plugin, warned that the usual automatic updates won't apply this fix. Security plugins can't reliably block it either, because the attack can fire before they run. Researchers have shown working attacks against WordPress, Drupal and Joomla.

The fix has to come from whoever runs PHP on your server. On shared hosting with cPanel or a similar control panel, that's your hosting company. On a server you rent and manage yourself (a VPS), it's you or your developer.

Is your website affected?

Your site is at risk if it runs on PHP and the server hasn't been updated since 21 October. PHP says every installation that serves web pages is in scope, whichever way it's hooked up to the web server: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP or LiteSpeed. The risk is highest with mod_php, where an attack can start before any of your site's own code runs.

Your PHP version Fixed in Still supported?
8.5 8.5.12 Yes
8.4 8.4.27 Yes
8.3 8.3.36 Yes
8.2 8.2.35 Until 31 December 2026
8.1, 8.0, 7.4 and older No official release No

Two catches. Many hosts get PHP from their Linux distribution, which can apply the fix without changing the version number you see. And the fix only works once PHP has been restarted. Your host can confirm both.

On PHP 8.1 or older, the PHP project no longer ships updates. Some hosts have patched older versions themselves, but the lasting answer is moving to 8.3 or newer. With 8.2 losing support in December, plan that move now.

How worried should you be?

Enough to act this week, not enough to panic.

Attacks are real and widespread. A lab at Delft University of Technology runs decoy servers, called honeypots, to watch attackers. Between 21 and 28 October, it logged 72,343 attack requests from 659 internet addresses in 73 countries.

On 24 October, one researcher's honeypots recorded successful attacks, though their setup favoured the attacker. Two days later, the US cybersecurity agency CISA added both flaws to its list of vulnerabilities known to be exploited.

Then again, as of 28 October Wordfence knew of no WordPress site compromised through PHP2Shell. So: lots of attempts, a few confirmed successes, and a window closing fast for anyone still unpatched. For a hotel, guesthouse or restaurant, the bigger worry is exposed guest booking and contact details, not a defaced homepage.

What to do this week

  1. Ask your host one question. "Have you applied the 21 October PHP security release to my server, and restarted PHP?" Ask for a yes or no and a date. GoDaddy, for instance, said it had patched its main platforms by 22 October.
  2. Check your PHP version. In WordPress, go to Tools → Site Health → Info → Server. In cPanel, look for MultiPHP Manager or Select PHP Version. If you're on 8.1 or older, ask about upgrading.
  3. Can't patch today? A web application firewall, a filter that sits in front of your site, can block known attacks. Cloudflare added emergency PHP2Shell rules on every plan, including the free one. Your developer can also apply PHP's interim settings, such as session.upload_progress.enabled=0. Neither is a cure: PHP says only the update fully fixes it. Otherwise, EU cybersecurity officials at CERT-EU advise taking the site offline rather than leaving it exposed.
  4. Look back, not just forward. Amazon advises checking for signs of trouble back to 17 October. If your site sat unpatched for days, change your admin, database and hosting passwords, plus any payment or booking keys: researchers at Wiz showed one flaw can leak secrets from server memory. Unfamiliar admin accounts or files are warning signs that need professional help.

Two related warnings

On 23 October, PHP flagged a third flaw, CVE-2026-115560, which it calls an unlikely risk. It needs an unusual mix of settings and code, and as of 29 October there's no fix yet. The interim step is the same setting, session.upload_progress.enabled=0, kept until PHP's next regular release.

Separately, if your WordPress site uses the Bricksforge plugin, an add-on for the Bricks page builder, update it now. Its flaw, CVE-2026-85097, lets anyone upload and run PHP code without logging in, and attackers have targeted it since 7 October. Unlike PHP2Shell, this one is fixed by a normal plugin update, to version 3.1.8.10 or 4.0.1.

The bigger lesson

Every website stands on layers you never see: the language, the server, the hosting. Each needs someone keeping it updated, and a green WordPress dashboard doesn't cover them.

At Agenor.BI, we build websites that don't use PHP, so PHP2Shell doesn't apply to them. No technology is bug-free and every site still needs looking after, but it does take PHP emergencies like this off your plate. Want a hand checking your current site, or weighing up a rebuild? Get in touch.

Key takeaways

  • PHP2Shell is two critical flaws in PHP itself that let attackers take over unpatched servers without a password.
  • Updating WordPress, themes or plugins won't fix it: your host or developer must update PHP and restart it.
  • Fixed versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or a patched package from your Linux vendor.
  • PHP 8.1 and older get no official release, and PHP 8.2 support ends on 31 December 2026.
  • Attacks are under way, so get your host to confirm the patch this week.