In this article
  1. What happened
  2. Timeline
  3. How serious is it?
  4. What website owners should do
  5. Why it matters
  6. What comes next
  7. Frequently asked questions

Updated 22 October 2026. This is a developing story; we will update it as new official information is published.

A critical PHP vulnerability, nicknamed PHP2Shell, can let an attacker run code on a web server without logging in. The PHP project released fixes on 21 October: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Because PHP runs most of the web, including WordPress, Drupal and Joomla, every site owner should check that their PHP version is one of these or newer.

Key facts

  • Two flaws: CVE-2026-109618 and CVE-2026-109619, both allowing unauthenticated remote code execution.
  • Fixed in: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released 21 October 2026.
  • Affected: unpatched PHP back to version 5.4, according to security firm Sansec.
  • Found with AI: researchers at Calif, Wiz and OpenAI, using frontier AI models to build working exploits.

What happened

The PHP security team published a security advisory on 21 October urging all users to update immediately. It says the risk applies to all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, and is highest for mod_php.

In plain terms, the two bugs are memory mistakes. One happens when PHP runs out of memory part-way through setting up a request, leaving half-built data that is later treated as valid. The other lets leftover data from one visitor’s request survive into the next one after its memory has been freed. A skilled attacker can turn either mistake into control of the server.

Wiz Research says it combined the bugs into one exploit script and showed it could take over WordPress, Drupal and Joomla installations from their latest official container images without a password. It credits Calif, OpenAI and the PHP team, and says frontier AI models made the complex exploit practical “in hours”.

Timeline

Date (UTC)Event
1 August 2026Calif finds several remote code execution paths
11 AugustCalif reports the first bug to PHP
24 AugustWiz Research reports the vulnerabilities to PHP
20 OctoberDetails leak; another firm confirms remote code execution
21 October, 07:43Cloudflare reports early attacks
21 October, 14:00PHP releases fixed versions; researchers publish details
Source: Sansec’s PHP2Shell timeline.

How serious is it?

Serious, but the picture improved on 22 October. Sansec’s updated analysis says an attack needs specific knowledge of the target server and specific conditions, that the public exploits do not work against a default PHP installation, and that mass exploitation is less likely than first feared. Several Dutch websites, including the House of Representatives and the national cyber security centre, went offline as a precaution on 21 October.

The UK’s National Cyber Security Centre is urging organisations to take immediate action: find every PHP system, starting with internet-facing ones, and update it.

What website owners should do

  1. Check your PHP version. In WordPress, go to Tools, then Site Health, then Info, then Server. Anything below the fixed version for your branch is vulnerable.
  2. Ask your host. On shared hosting, the hosting company controls PHP. Ask when the patched build will be live, or switch to a patched version in your control panel when it appears.
  3. Update old sites. PHP 8.1 and older no longer get official updates. The PHP team released minimal source patches for 7.4, 8.0 and 8.1, but upgrading to a supported version is the real fix.
  4. If you cannot update yet, PHP lists temporary steps such as a low post_max_size (8M if you do not need uploads). These reduce exposure but do not make a server safe.
  5. Watch for signs of compromise: unknown admin users, new files in upload folders or unexpected redirects.

Keeping software up to date is the single best defence, as we explain in why software updates matter for security. For what happens when attackers get in, see the biggest data breaches in history.

Why it matters

Wiz says PHP powers about 70% of websites. Its researchers argue that AI is changing the economics of hacking: bugs that were too complex to exploit by hand can now be turned into working attacks quickly. That cuts both ways, since the same tools helped find and fix these flaws. Our article on where AI still fails looks at the limits of these systems.

What comes next

Linux distributions and long-term support vendors received the patches in advance, so updated packages should spread quickly. Expect hosting companies to roll out patched PHP builds over the coming days, and security firms to keep watching for attacks against servers that are slow to update.

Frequently asked questions

What is the PHP2Shell vulnerability?

PHP2Shell is the name for two critical PHP bugs, CVE-2026-109618 and CVE-2026-109619, that can let attackers run code on a web server without logging in.

Which PHP version fixes the vulnerability?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October 2026, or any later version.

Is WordPress affected by the PHP vulnerability?

WordPress runs on PHP, so sites on unpatched PHP are exposed. Wiz demonstrated an attack on the latest WordPress container image. The fix is updating PHP, not WordPress.

Should I take my website offline?

Sansec says most stores do not need to, because public exploits do not work against default installations. The UK NCSC says to consider taking a system offline if you can neither update it nor apply the temporary mitigations.

Read more in our Cybersecurity section.

Sources

  1. PHP: Security advisory, critical remote code execution vulnerabilities (21 October 2026)
  2. Wiz Research: PHP2Shell, AI uncovers critical RCE vulnerabilities
  3. Sansec: PHP2Shell critical PHP RCE (CVE-2026-109618, CVE-2026-109619)
  4. UK National Cyber Security Centre: Critical security issue affecting PHP