The PHP project shipped an emergency security release on Wednesday, October 21, 2026: PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. They fix two vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that researchers call PHP2Shell. PHP rates both 9.2 (Critical) under CVSS v4.0 and says they can allow unauthenticated remote code execution. Details leaked a day before the fix, Cloudflare reported early attacks that morning, and PHP runs most of the web, WordPress included. It was a patch-the-same-day event, and a site still on an older build is still exposed.
What PHP Confirmed
PHP's advisory describes two bugs, both fixed in the same releases:
- CVE-2026-109618, remote code execution via out-of-memory corruption (GHSA-w8hw-w9fx-j79w). If PHP runs out of memory at the wrong moment, it can be interrupted while internal request data is only half set up, and the cleanup afterward treats that broken data as valid.
- CVE-2026-109619, remote code execution via stale global state (GHSA-6wmf-4rv5-p3rp). Some per-request state can outlive the memory behind it, and the next request handled by the same PHP worker can use it before it gets reset.
Who is at risk, per PHP: every installation serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. PHP considers mod_php the highest risk, with a demonstrated exploit in which one unauthenticated request triggers the attack before any application code runs. PHP-FPM is what most WordPress hosts use, and it's on the list too.
That last part matters for WordPress. The attack lands in PHP itself, before WordPress or any plugin has loaded, so no WordPress security plugin can stop it. The fix has to happen on the server.
PHP also says Linux distributions and long-term-support vendors got the patches in advance, so updated packages may already be waiting from your distribution.
How We Got Here
On October 20 a Hacker News post claimed two PHP remote code execution bugs were due for disclosure on Thursday, October 22. It was taken down, but screenshots spread. Security firm watchTowr confirmed the bugs were real and under embargo, and PHP moved its release up a day. (The Hacker News, Huntress)
On the morning of October 21, Cloudflare's CTO said the company was seeing early attacks and had pushed WAF rules for known exploit paths to every Cloudflare customer, free plans included, calling them a stopgap until the patch. (Tenable, Sansec)
One more warning from Tenable: code claiming to exploit PHP2Shell is circulating, unverified, and some of it may be malware aimed at the people running it. Don't download "test scripts" to check your own server.
Which PHP Builds Are Fixed
Being on a current branch does not make you safe. Every branch is vulnerable until it runs the patched build; the only difference is whether a patch exists for it.
| Your PHP Branch | Fixed In | Notes |
|---|---|---|
| 8.5 | 8.5.12 | |
| 8.4 | 8.4.27 | |
| 8.3 | 8.3.36 | |
| 8.2 | 8.2.35 | Branch reaches end of life December 31, 2026 |
| 8.1, 8.0, 7.4 | No official release | PHP published minimal source patches for these |
| 7.3 and older | No fix | Upgrade |
The builds before the October 21 release were 8.5.11, 8.4.26, 8.3.35 and 8.2.34. Anything at or below those numbers is unpatched, unless your distribution or host backported the fix into its own package. If they did, they should be able to tell you so.
If you're on PHP 8.1 or older, the reliable fix is an upgrade to a supported branch. The source patches for 7.4, 8.0 and 8.1 help a host or distribution that builds PHP itself; they do nothing for a site owner on shared hosting. Our PHP version guide for WordPress covers what moving up involves and how to test plugins first.
How to Check Your WordPress Site's PHP Version
- In wp-admin, go to Tools → Site Health → Info.
- Open the Server section.
- Read the PHP version line. You need the full number (for example 8.3.36), not only the branch.
Site Health reports the PHP build that is serving your site, which is the one that matters. Over SSH, php -v reports the command-line build, which can differ from the one PHP-FPM or Apache is running. Updating packages without restarting PHP-FPM or Apache leaves the old build in memory, still serving requests.
What to Do, in Order
1. Get the patched build onto your server. On shared or managed WordPress hosting, your host controls the PHP binary and you can't patch it yourself. Ask them when the fixed build reaches your site, then check Site Health instead of assuming. On your own server, install your distribution's updated packages or build from source, restart PHP-FPM or Apache, and confirm the running version. Sansec notes that Remi's repository, a common PHP source on RHEL-family servers, was not publishing updates on October 21.
2. If you're behind Cloudflare, make sure attackers can't go around it. Cloudflare's emergency rules only see traffic that passes through Cloudflare. If your origin server answers requests from any IP, an attacker who finds the origin address skips the rules entirely. Restricting the origin firewall to Cloudflare's IP ranges closes that gap.
3. Know what the stopgaps cost, and that they're partial. PHP's advisory says there are no complete mitigations. Sansec lists blocking multipart/form-data requests at the web server as an interim measure, which also breaks file uploads, media library uploads and some checkout and contact forms. The .htaccess versions of that rule circulating after the release only work on Apache. Hosts that serve WordPress on nginx, Kinsta among them, ignore .htaccess entirely, so there the rule has to go in the server config or a WAF in front of it. Turning off session.upload_progress.enabled was also suggested, but PHP's own developers have said ini settings won't save you.
4. Upgrade anything on PHP 8.1 or older. No release is coming for those branches. If a site can't move today, consider taking it offline or behind a firewall until it can.
5. After patching, check whether anyone got in first. Like any remote code execution bug, the patch closes the hole but evicts nobody. Look for:
- PHP files you can't explain in the web root,
wp-content/uploads/orwp-content/mu-plugins/ - Admin users and plugins nobody on your team added
- New cron jobs or scheduled tasks
- Web server or PHP-FPM processes starting shells or download tools (
sh,bash,curl,wget), which is the pattern Huntress expects exploitation to produce
If you find any of that, treat the site as compromised and work through a full malware removal, then rotate database and admin passwords. Changing passwords while a backdoor is still in place just hands the attacker the new ones. We wrote about how that plays out in the reinfection cycle, and it's the same lesson as WP2Shell this summer: patching is step one, eviction is step two.
Why This One Is Different From a Plugin Bug
Most WordPress security news is about a plugin. You update the plugin, or deactivate it, and you're done. PHP2Shell sits underneath all of that. PHP is the language WordPress, WooCommerce and every plugin run on, and PHP's own advisory describes an attack that can fire before application code runs. Your WordPress version, your plugins and your security plugin don't enter into it.
That's also why the exposure numbers are large. Tenable cites estimates of more than 1.3 million internet-facing hosts potentially vulnerable, and The Hacker News reports roughly 884,000 hosts whose banners advertise PHP 8.1 or older, the branches with no official release coming.
What TopSyde Is Doing for Our Clients
If TopSyde hosts your site, this is where things stand:
- Every site we host is running the patched PHP build. PHP on our platform is built and shipped by Kinsta. After each site updated, we confirmed it was serving the patched build and checked that nothing broke.
- TopSyde Sentinel already scans every site daily for exactly what a remote code execution attack leaves behind: webshells, PHP files where they don't belong, rogue plugins and rogue admin accounts.
You don't need to open a ticket or change anything. If you want to talk it through anyway, reply to any of our emails or open a ticket in the portal.
Not hosted with us? Our free scanner checks your site from the outside for signs of an infection. It can't see your PHP version or patch your server, but it will tell you if something is already wrong. If it finds something, our malware removal service cleans it up and finds how the attacker got in. Hosting with us, which covers PHP updates and Sentinel, starts at $59/mo per site.
Frequently Asked Questions
What is PHP2Shell?
PHP2Shell is the name researchers gave to two critical vulnerabilities in PHP itself, CVE-2026-109618 and CVE-2026-109619. PHP rates both 9.2 under CVSS v4.0 and says they can allow unauthenticated remote code execution. They were fixed on October 21, 2026 in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
Is my WordPress site affected?
Yes, unless it already runs one of those patched builds. PHP says every installation serving web requests is at risk, whether it runs PHP-FPM, mod_php, php-cgi, FrankenPHP or LiteSpeed. Check your exact PHP version under Tools → Site Health → Info → Server.
Can a WordPress security plugin protect me?
No. The flaws are in PHP, below WordPress, and PHP describes an attack that can run before any application code loads. The fix is a PHP update on the server. A firewall in front of the site, like Cloudflare's emergency rules, can reduce risk for a few hours but is not a substitute.
I'm on PHP 8.1 or older. Will I get a patch?
Not as an official release. PHP published minimal source patches for 7.4, 8.0 and 8.1, which a host or Linux distribution can build into its own packages, so ask yours. The reliable path is upgrading to PHP 8.2 or newer, and since 8.2 reaches end of life on December 31, 2026, 8.3 or later is the better target.
Does patching PHP remove an attacker who already got in?
No. The update stops new attacks. Webshells, rogue admin accounts, malicious plugins and stolen credentials planted before you patched are still there afterward. Check for them once you've updated, and rotate passwords after the cleanup, not before.
Founder & Lead Developer
20+ years full-stack development, WordPress, AI tools & agents
Colton is the founder of TopSyde with 20+ years of full-stack development experience spanning WordPress, cloud infrastructure, and AI-powered tooling. He specializes in performance optimization, server architecture, and building AI agents for automated site management.



