PHP2Shell and WordPress: Which PHP Versions Are Fixed and What to Do Now
PHP2Shell is the name for two critical vulnerabilities in PHP itself, published on October 21, 2026. For anyone running WordPress, PHP2Shell matters because WordPress runs on PHP: if the server’s PHP version is vulnerable, the site is too, no matter how clean the plugins are.
The fix is a PHP update. Here’s what the flaws are, which versions are patched, and how to check your own site in about five minutes.
What PHP2Shell is
PHP2Shell covers two flaws, CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 out of 10 (CVSS v4.0), and both can let an attacker run code on the server without logging in. That’s the worst category a web server can have.
According to The Hacker News, the flaws affect every PHP setup that serves web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The affected code goes back to PHP 5.4. The same report notes that attackers can also read memory from PHP processes, which may expose passwords, API keys and tokens from other requests.
The research team that found the flaws says it confirmed pre-login code execution against specific versions of popular PHP applications, WordPress included, as summarized in Tenable’s PHP2Shell FAQ.
Is PHP2Shell being exploited?
Attempts, yes. Amazon reported exploit attempts against its honeypots starting October 17, four days before the patch, and Cloudflare and watchTowr both reported attacks after the release. As of October 21, no successful break-in had been publicly confirmed.
The details leaked a day early, and a proof-of-concept video was posted by accident. That’s why patched versions came out ahead of schedule, and why waiting a few weeks isn’t a safe plan this time.
Which PHP versions fix PHP2Shell
The CERT-EU advisory lists these fixed versions:
| Your PHP branch | Update to |
|---|---|
| 8.5 | 8.5.12 or later |
| 8.4 | 8.4.27 or later |
| 8.3 | 8.3.36 or later |
| 8.2 | 8.2.35 or later |
| 8.1, 8.0, 7.4 | No official release. Source patches exist, but plan a move to 8.3 or newer. |
| 7.3 and older | No fix. Upgrade. |
One detail matters for anyone on a VPS. Linux distributions often patch PHP without changing the version number, so “8.3.6” from your distro can be safe while “8.3.6” built elsewhere isn’t. In that case, check your package’s changelog for the two CVE numbers instead of the version.
How to check your WordPress site’s PHP version
You don’t need server access for this. In WordPress, go to Tools → Site Health → Info, open the Server section, and read the PHP version line.
What to do next, by type of hosting
Managed WordPress hosting
Large managed hosts are rolling out patched PHP builds on their own. Check your host’s status page or ask support directly which build you’re on and when it was patched. If you can’t get a clear answer, treat the site as unpatched.
Shared hosting with cPanel or a similar panel
Many shared hosts let you pick the PHP version yourself, usually under “Select PHP Version” or “MultiPHP Manager”. If you’re on 8.2 or newer, make sure the patched minor version is selected. If the panel only offers older builds, ask the host when the fixed ones arrive.
VPS or your own server
Update the PHP packages from your distribution, restart every PHP-FPM pool or the web server, and confirm the CVEs are listed as fixed in the changelog. A restart is part of the fix: old PHP workers keep running the vulnerable code until they’re replaced.
Still on PHP 7.4, 8.0 or 8.1
This is the group that needs real work. Jumping two or three PHP versions can break old plugins and themes, so make the move on a staging copy first, test checkout, forms and logins, then switch the live site.
If you don’t have staging yet, here’s how to set up a staging and deploy pipeline. It’s overdue anyway: these versions stopped getting regular security updates years ago.
If you can’t update today
The PHP team and CERT-EU are clear that only an update fully fixes PHP2Shell. There are temporary server settings that reduce exposure, such as turning off session.upload_progress.enabled, but they’re for whoever runs the server, they need a worker restart, and they don’t close both flaws.
If your site is behind Cloudflare, it has deployed firewall rules for the known attack patterns on all plans, including free. Help Net Security’s summary covers the details. Treat that as a bridge for a day or two, not a fix.
After the update: signs worth checking
Since attempts started before the patch, it’s worth a quick look back from October 17. Reports point to a few signs in server logs:
- Unusual multipart requests followed by memory-limit errors.
- Bursts of HTTP 500 errors with no matching site change.
- Very large PHPSESSID cookies.
- PHP workers restarting for no clear reason.
If you see these, rotate the passwords and API keys stored on that server, including payment gateway keys and the WordPress salts. PHP2Shell can leak memory, so secrets are the first thing to replace. Here’s what cleaning up a real hack looks like, and our WordPress security guide covers the rest of the basics.
How we handle updates like this
On the sites we care for, a PHP update goes through staging first, gets tested, then ships through a deploy pipeline, so an emergency patch is a same-day job instead of a risky one. When we moved a Canadian university’s WordPress multisite off a legacy AWS setup, the point was exactly this: visual regression tests on every subsite, cleaner update routines, and a migration with no downtime or data loss.
If you want that kind of setup, our WordPress DevOps work covers staging, CI/CD and safe updates, and our WordPress CI/CD guide explains how the pipeline works.
PHP2Shell is a server problem with a simple first step. Open Site Health, read one line, and make sure the number is on the fixed list.



