Websites October 22, 2026 7 min

PHP2Shell: What the Critical PHP Vulnerability Means for Your Website

Two critical PHP flaws, emergency-patched October 21 with exploitation attempts already observed. What to do today, and how to make sure the next one isn't your problem.

By Elevato Editorial

On October 21, the PHP project shipped emergency patches for two critical security flaws, released a day early because the details had already leaked. Together they're being called PHP2Shell, and they allow an attacker to run code on a vulnerable web server without logging in to anything. Exploitation attempts were observed before the flaws were even public.

If your website runs WordPress, Drupal, Joomla, or Magento, it runs PHP, and this applies to you. Here is what happened, how to find out if you're exposed, what to do today, and why this class of emergency keeps happening to PHP websites when it doesn't have to.

Quick answer: PHP2Shell is the name for two critical PHP vulnerabilities (CVE-2026-109618 and CVE-2026-109619, both rated CVSS 9.2) patched on October 21, 2026. They allow unauthenticated remote code execution on web servers running PHP, with affected code dating back to PHP 5.4. Fixed versions are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35; older branches get partial fixes or none. Every WordPress site runs PHP.

What happened

Two bugs in PHP itself, not in any plugin or theme: one a memory-corruption flaw (CVE-2026-109618), the other a use-after-free that can also leak server memory (CVE-2026-109619). The PHP Foundation rates both 9.2 on CVSS v4.0. The release was scheduled for October 22 and pulled forward a day after the CVE details leaked, along with an exaggerated 10.0 severity score that PHP has corrected.

The exploitation window didn't wait for the announcement. Amazon's threat-intelligence honeypots recorded an exploitation attempt on October 17, four days before disclosure, and both Amazon and Cloudflare now report attack attempts in the wild. Public exploit code is circulating.

Your PHP branchStatus
PHP 8.5.xFixed in 8.5.12 — update now
PHP 8.4.xFixed in 8.4.27 — update now
PHP 8.3.xFixed in 8.3.36 — update now
PHP 8.2.xFixed in 8.2.35 — update now
PHP 7.4 – 8.1No official release; source-level backports only
PHP 5.4 – 7.3End of life. No fix exists or will exist.

That last row matters more than it looks: hundreds of thousands of end-of-life PHP hosts can never be patched against this. If your site is on one of them, the only fix is moving.

Is your website exposed?

You don't have to know what PHP is to be running it. PHP is the language behind WordPress, Drupal, Joomla, Magento, and most "custom" sites built in the 2010s. WordPress alone powers about 43% of all websites, and roughly three-quarters of sites with a known server-side language run PHP (W3Techs).

Five ways to tell:

  • Your site runs WordPress, Drupal, Joomla, or Magento: you run PHP.
  • Your site has a /wp-admin or /administrator login page: you run PHP.
  • Your agency built it "custom" before about 2020 and you're not sure in what: probably PHP; ask.
  • Your host runs Apache with mod_php: the highest-risk configuration; PHP demonstrated an exploit that triggers by unauthenticated request before your site's own code even runs.
  • Your PHP version starts with 5, 6, or 7.0–7.3: no patch exists for you.

The practical test is one email to your host or agency: "What PHP version are we running, and has it been patched for PHP2Shell?" A good host answers with a version number and a date this week. A vague answer is itself the finding.

What to do today

Patch first, decide later. In order:

  1. Update PHP to 8.5.12, 8.4.27, 8.3.36, or 8.2.35. On managed WordPress hosting, confirm your host has done it; the good ones already have.
  2. Can't update immediately? PHP published interim settings that reduce exposure without making you safe: set memory_limit so applications cannot override it, disable session.upload_progress, and restart every PHP worker after the change. A WAF in front of the site is a stopgap, not a fix.
  3. Update WordPress core and plugins too. It is unrelated to PHP2Shell, but the same attackers scan for everything at once. Our best practices to protect your WordPress website covers the routine.
  4. On an end-of-life PHP branch? Treat the site as exposed from today onward and start planning its replacement. There is no patch coming.

The part no advisory says out loud: this will happen again

PHP2Shell is unusual only in being in PHP's core. The surrounding weather is constant. Patchstack's 2026 State of WordPress Security report counted 11,334 new WordPress-ecosystem vulnerabilities in 2025, up 42% in a year, with more than nine in ten found in plugins. Disclosure-to-mass-exploitation now has a median measured in hours, and nearly half the disclosed flaws need no login to exploit.

The treadmill, by the numbers (Patchstack, 2026 report)
New WordPress-ecosystem vulnerabilities in 202511,334
Change from 2024+42%
Share found in pluginsMore than 9 in 10
Median time to first mass exploitation~5 hours

This is the maintenance treadmill every PHP site owner is on: monitor, patch, hope the window was short enough, repeat. Each patch is necessary. None of them makes next month's disclosure less likely, and the plugins you added for speed and features widen the target, the same dynamic covered in why WordPress sites struggle to stay fast.

The structural fix: remove the attack surface instead of guarding it

A traditional PHP website executes code to answer every visitor. That means three standing doors on your public domain: a language runtime that executes on every request, a database connected to it, and an admin login (/wp-admin) reachable by anyone. PHP2Shell was a flaw in the first door. Most WordPress hacks come through the plugins behind it. Credential stuffing goes after the third.

The custom website design and development work we do closes all three by not shipping them. Pages are pre-rendered to plain HTML and served from a CDN. When a visitor requests a page, the server hands back a file; no code executes, so there is no code to exploit. There is no database on the request path and no admin login anywhere on your domain: content editing happens in a separate, managed CMS behind its own authentication, and publishing regenerates the files.

Traditional PHP siteStatic build
PHP runtime executes on every requestPre-rendered HTML served from a CDN
Database connected to the public siteNo code executes on the request path
/wp-admin login on your domainNo database behind the public site
30+ plugins, each a separate vendorCMS off-domain, behind its own auth
Patched on your schedule, attacked on theirsNothing for a PHP2Shell-class exploit to run inside

A PHP2Shell-class vulnerability cannot touch a site built this way, whatever next year's version of it turns out to be. Not because the stack is patched faster — because the thing the exploit needs to run inside doesn't exist.

What a static build doesn't fix

Honesty requires this section. No website is unhackable. A static architecture still depends on your domain registrar and DNS account, your hosting account's credentials, the third-party scripts you choose to embed, and the CMS vendor's own security. Those doors are fewer, smaller, and mostly not on your domain, and none of them is patched on your schedule at 2 a.m. That is the realistic claim: not zero risk, but an attack surface reduced to a fraction of what a PHP site carries, with the emergency-patch treadmill gone entirely.

If this is your second PHP emergency

Most people reading PHP2Shell coverage own a WordPress site that was due for a rebuild anyway: slow, plugin-heavy, and now exposed twice in one news cycle. A rebuild is a smaller project than it sounds: most land between $3,000 and $10,000 one-time, and the pricing calculator gives a range in about 60 seconds. A redesign done without losing rankings covers the migration that protects your Google positions on the way over. Builds run from about 30 days.

Get off the treadmill

Patch today regardless; that part is urgent and free. Then decide whether you want to be reading the next one of these advisories as an affected party or as a spectator. Get a Build Estimate for a security-focused rebuild, or run the pricing calculator for a 60-second ballpark.

Frequently Asked Questions

What is PHP2Shell?

PHP2Shell is the collective name for two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, disclosed on October 21, 2026 and rated 9.2 on CVSS v4.0. They allow unauthenticated remote code execution on web servers running PHP, and affected code dates back to PHP 5.4. Fixed versions are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35.

Is WordPress affected by PHP2Shell?

Yes. WordPress runs on PHP, so every WordPress site is affected until the server's PHP is updated to a fixed version. Updating WordPress core or plugins does not fix PHP2Shell; the PHP runtime itself must be patched, which is usually your hosting company's job. Ask them to confirm.

How do I know what PHP version my website runs?

Ask your host or agency directly, or check your hosting control panel (cPanel and most managed WordPress hosts show it under "PHP version"). If your site runs WordPress, the Site Health tool (Tools → Site Health → Info → Server) shows the PHP version. Anything starting with 5, 6, or 7.0–7.3 has no PHP2Shell fix available.

Can static websites be hacked?

No website is unhackable, but a static site removes the server-side attack surface: no code executes on page requests, so vulnerabilities like PHP2Shell have nothing to exploit. Remaining risks are the hosting and DNS accounts, embedded third-party scripts, and the CMS vendor's platform: fewer and smaller doors, none requiring emergency patches on your server.

What does it cost to move a website off PHP or WordPress?

A professional rebuild on a modern static stack typically costs $3,000–$10,000 one-time, depending on page count, content migration, and integrations. Content and URLs migrate with rank-protecting redirects, and ongoing costs drop because there are no plugins or security patches to maintain.

Will we lose our Google rankings if we leave WordPress?

Not if the migration is done properly. Rankings attach to your URLs and content, not to WordPress. A rebuild that maps every URL, preserves or redirects each one, and migrates metadata keeps your positions; done well, speed and Core Web Vitals usually improve them.

SecurityPHPWordPressPHP2ShellWebsite Builds
Share LinkedIn Share on X
/ Want this applied to your business?

Spend 30 minutes with our owner.

Book a Strategy Call

Prefer to see a number first? Try the pricing calculator.