PHP2Shell: What Happened, What to Do Now, and When to Leave PHP Behind

PHP2Shell: What Happened, What to Do Now, and When to Leave PHP Behind

PHP disclosed two critical runtime vulnerabilities on October 21, 2026. Here is how to check affected versions and hosting updates, and when to evaluate a different website architecture.

Michael Rossi
Michael Rossi
Oct 22, 2026
  • PHP2Shell is two critical flaws in PHP itself, not in a plugin, theme or CMS
  • An attacker needs no login to run code on a vulnerable server
  • The fix is a patched PHP release; updating WordPress alone does nothing
  • Sites on PHP 8.1 or older get no official fixed release
  • A static or hosted site has no PHP server for this kind of flaw to reach
  • Migrating is a planned project, not an emergency response; patch first

On October 21, 2026, the PHP project published advisories for CVE-2026-109618, out-of-memory corruption, and CVE-2026-109619, stale global state. The pair is commonly called PHP2Shell. Check the vendor advisories and your host's update status for your deployment.

If your website runs on WordPress, Drupal, Joomla or a custom PHP application, this one is about you. Here is what happened in plain terms, what to do today, and the bigger question it raises.

What PHP is, and why one bug reaches so many sites

PHP is the programming language that runs on the server behind most traditional websites. When someone visits a WordPress page, the server starts PHP, PHP runs WordPress, WordPress pulls content from a database, and the result is sent back as a web page. This happens when a request reaches the application rather than a cached response.

That makes PHP the floor that everything else stands on. A flaw in a WordPress plugin affects sites using that plugin. A runtime flaw can affect applications on vulnerable PHP versions. Actual exposure depends on the flaw, configuration, and hosting setup.

What PHP2Shell actually is

Both vulnerabilities are rated 9.2 out of 10 for severity, and both allow unauthenticated remote code execution. In everyday terms: an attacker doesn't need a password or an account. They send specially crafted requests to your site and can end up running their own code on your server, with the same access your website has.

The two bugs work differently:

  • One is memory corruption that happens when PHP runs out of memory partway through a request. Researchers showed that a request with hundreds of empty file-upload fields can exhaust PHP's default memory limit while staying under its default upload size limit.
  • The other is a "use-after-free" bug tied to state PHP keeps between requests. PHP reuses its worker processes, so damage left behind by one request can be picked up by the next.

The conditions for the second bug are met by a default setting, session upload progress, which is switched on in most installations. Researchers demonstrated working attacks against the latest WordPress, Drupal and Joomla releases.

How serious is it right now?

The PHP project classifies both vulnerabilities as critical. If your deployment uses an affected version, ask your host or administrator to confirm the fix rather than assuming a CMS update covers it. Reports of active exploitation change quickly; this article does not establish whether a particular site has been attacked.

What to do today

  1. Find out which PHP version your site runs. Your host's control panel will show it, or in WordPress go to Tools, then Site Health, then Info, then Server.
  2. Use a vendor-supported release containing the fixes. The advisories list 8.5.12, 8.4.27, 8.3.36 and 8.2.35 as patched releases; later supported releases may also include them. On managed hosting, ask your host whether they have already done this. Many moved quickly.
  3. If you are on PHP 8.1 or older, you have a bigger problem. Those versions are past end of life and get no official fixed release. The PHP team published source patches for 7.4 through 8.1, but applying them means building PHP yourself, which most hosting setups can't do. Upgrading to a supported version is the realistic path.
  4. If you can't update straight away, ask your host or security team for deployment-specific mitigations from the PHP advisories. Changing a single setting is not a substitute for the complete fix.
  5. Updating WordPress, your theme or your plugins does not help here. The flaw is in PHP, underneath all of them.

If you believe your site may have been compromised, treat it as an incident: take a backup for evidence, rotate passwords and keys, and get someone who does security response to look at it.

The bigger question: does your website need a PHP server?

A fixed PHP release addresses these vulnerabilities. The longer-term question is who maintains the runtime, application, plugins and hosting, and whether that operational work still makes sense for the website.

None of this means WordPress or PHP is badly built. It is the cost of the architecture. A traditional WordPress site runs code on a server for every visitor, and that server, its PHP version, its plugins and its database all need watching, patching and upgrading for as long as the site exists.

For a marketing site that mostly publishes pages and articles, that is a lot of moving parts to keep safe.

What a modern setup looks like

The alternative isn't exotic. It's how a growing share of marketing sites are built today, including this one.

  • Static sites built with Astro are generated ahead of time and served as plain files from a global network. Visitors never trigger code on a server you maintain, so a flaw like PHP2Shell has nothing to reach. Content lives in a visual CMS such as Sanity, so marketing still edits pages without a developer.
  • Framer hosts the whole site for you. There is no server, PHP version or plugin stack on your side to patch. Marketing designs and publishes directly.
  • A headless CMS such as Sanity or Contentful suits content that feeds the website, a product and other channels at once.

To be clear, no stack is immune to security issues. Build tools, CMS accounts and third-party scripts still need care. The difference is how much of your attack surface is a live server running code on every request, and who is responsible for patching it at 2am.

When to migrate, and when not to

Don't migrate in a panic. Patch PHP first. A migration is a planned project that takes weeks, and your current site needs to be safe in the meantime.

Then take an honest look. Leaving WordPress makes sense when:

  • Security patches, plugin updates and PHP upgrades take real time every month
  • You are on an old PHP version and upgrading means breaking plugins or your theme
  • Marketing can't publish without a developer
  • A redesign is coming anyway

Staying is a reasonable call when the site is stable, your team is fluent in it, and someone maintains it well. Migrate because the platform is holding you back, not because of one headline.

How we can help

We move teams off WordPress and other PHP platforms onto Framer, Astro and headless CMS setups. A typical migration looks like this:

  • An audit of your current site: pages, content types, plugins, integrations and what each one is actually doing for you
  • A recommendation on where to go, based on who edits the site and how much content it carries
  • Content moved by script, including posts, pages, custom fields and media
  • Every indexed URL mapped to a tested 301 redirect, with titles, descriptions and structured data carried across, to reduce migration risk; search rankings are not guaranteed
  • Forms, CRM, analytics and consent tools reconnected
  • A launch, then Search Console monitored afterwards

A typical marketing site takes five to eight weeks, including content. If you want help deciding whether to move, or need a hand getting patched first, book a call with us. You can also read more about leaving WordPress, or the specific paths to Framer and Astro.

Primary sources

Checked November 5, 2026. Product security guidance can change; use the current vendor advisory for operational decisions.

Share
Next articleRead now
Anyone Can Build an App with AI. Standing Out Is the Hard Part.

Let's discuss how we can bring your ideas to life.

© 2026 Push Refresh. All rights reserved.