Home / Blog

PHP2Shell: what it means for your website, and where AI comes into it

In October two serious bugs turned up in PHP itself. Not in a WordPress plugin or a theme, but in the language underneath them. They've been given a name, PHP2Shell, and two CVE numbers (CVE-2026-109618 and CVE-2026-109619). PHP released the fix on 21 October 2026, and people were trying the bugs out on real servers within days.

If your website runs on WordPress, WooCommerce or anything else built in PHP, this is worth five minutes. It's also a clear example of how AI is changing security, for the people looking after websites and for the people attacking them.

What PHP2Shell is

PHP is the language behind most small business websites. WordPress is written in it, and so are most of the plugins, booking systems and shops that sit on top. The two bugs are in how PHP handles memory. One is triggered when PHP runs out of memory at the wrong moment. The other is in the feature that reports how far a file upload has got.

In the worst case, someone on the internet can run their own commands on your server without logging in. That means anything the website itself can do, they can do. Both bugs scored 9.2 out of 10 for severity.

How easy that is depends on the setup. CrowdStrike showed a single request doing it on one common Apache configuration. Sansec found the public exploits didn't work against a default PHP install, and usually needed a second weakness in the website as well. So not every PHP site falls over on its own, but it's close enough that you don't want to bet on being the exception. The US cyber security agency, CISA, added one of the two to its list of vulnerabilities being exploited in the wild on 26 October.

Is your site affected?

If your site runs PHP and nobody has updated it since 21 October, assume it is. The fixed versions are:

  • PHP 8.5.12 or newer
  • PHP 8.4.27 or newer
  • PHP 8.3.36 or newer
  • PHP 8.2.35 or newer

PHP 8.1 and anything older gets no official fix, because those versions had already stopped receiving security updates. Some hosts patch old versions themselves, plenty don't. That's the real risk for small businesses: sites still running an old PHP version because nobody has looked at the hosting in years.

What to do

  1. Check which PHP version your site uses. On Plesk it's under Websites & Domains, then PHP Settings. Otherwise ask your host, or whoever built the site.
  2. Update to one of the versions above, then restart PHP so the new version is the one actually running. If the site runs in Docker, rebuild the image. Restarting the old one isn't enough.
  3. Don't rely on the quick workaround. Turning off session.upload_progress is doing the rounds as a fix. Datadog's researchers found it doesn't fully protect you. Updating PHP does.
  4. If you use Cloudflare, it added a firewall rule on 21 October that blocks the common attack. Useful, but it's a seatbelt, not a fix, and it doesn't cover sites that have changed one particular upload setting.
  5. If the site sat unpatched for a while, get it checked. Look for files nobody recognises and admin accounts nobody created.

Where AI comes into it

The memory bug wasn't new. PHP's developers had known about the crash since 2024, they just didn't know of any way to turn it into an attack. In the summer of 2026, a researcher at the security firm Calif started looking at it with one of OpenAI's models, as part of OpenAI's “Patch the Planet” programme for finding and fixing bugs in widely used software. With the AI helping, they turned that two-year-old crash into working remote code execution in under two weeks. Researchers at Wiz found the bugs separately, using their own tools alongside AI models from OpenAI and Google.

There's a fair argument about how much credit belongs to the AI and how much to the very experienced people steering it. Either way, a bug that had been in plain sight for two years became a working attack in a fortnight.

Attackers have the same tools. A security firm called Dream reported a campaign that chained PHP2Shell with a Linux kernel flaw to take full control of 25 servers, including systems on a US government-affiliated network. On the attackers' kit they found Claude Code, and hacking tools set up to use the Chinese AI models DeepSeek and Kimi. People were driving it; it wasn't an AI hacking on its own. Dream believes the campaign is China-linked, but hasn't named a group. Separately, Amazon's honeypots caught someone trying the bugs on 17 October, four days before the fix was released.

What that means if you run a small business

The gap between a bug being found and bots trying it on your website used to be weeks. Now it's days, and sometimes less. AI makes the attacker's half of that job quicker and cheaper, and they don't need to pick you out. They scan everything and see what falls over.

The defences haven't changed much. They've just stopped being optional:

  • Keep PHP and WordPress up to date, and make it someone's job to notice when an urgent patch lands.
  • Don't run a PHP version that's out of support. If your host can't move you to a current one, move host.
  • Fewer plugins. Each one you don't need is another place for the second weakness an attacker is looking for.
  • Keep backups somewhere the website can't reach, and test that they actually restore.

That's what my website care plans are for: hosting, updates, backups, and someone keeping an eye out for things like this. If you're not sure where your site stands, send me the address and I'll tell you what I can see from the outside and what to ask your host.

Not sure if your site is up to date?

Send me the address. I'll reply within one working day with what I can see from the outside and what to ask your host.

  • Free first call
  • Fixed written quote
  • Reply within one working day
Call TomGet a free quote