By Pinto Kumar, Tygart Media | Published 10/24/2026
In October 2026, two critical flaws in PHP, the language that WordPress is built on, forced emergency patching across the web. We run a network of WordPress sites on servers we manage ourselves, so this one landed on our desk immediately. Below is what happened, why a WordPress update alone does not fix it, and how we handled it.
What is the PHP2Shell vulnerability?
PHP2Shell is the nickname researchers gave to two bugs in PHP itself: CVE-2026-109618 and CVE-2026-109619. Both are remote code execution flaws, meaning an attacker can run commands on your web server without logging in. Both are rated 9.2 out of 10 (Critical) on the CVSS v4.0 scale.
In plain terms:
- CVE-2026-109618 is caused by PHP mishandling a “ran out of memory” situation, which can leave a request half-built and corrupt memory.
- CVE-2026-109619 is caused by PHP holding on to internal request data after the memory behind it has been freed.
Timeline: how fast this moved
- October 17, 2026: Amazon’s security team reported the first exploitation attempt against its sensors, four days before the fix existed. Investigations should start from this date, not from the day of disclosure.
- October 20, 2026: Details leaked ahead of the planned disclosure, and the PHP team announced an emergency release for the next day.
- October 21, 2026: PHP released fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Public exploit code reportedly appeared online around the same time.
Why WordPress sites are affected
WordPress, its plugins and its themes all run on PHP, so almost every WordPress site depends on the PHP version underneath it. Two things surprise people:
- Updating WordPress does not fix this. The bug is in the PHP runtime, not in WordPress. Only a PHP update fixes it.
- Security plugins cannot replace the patch. A plugin runs inside PHP, so it cannot protect against a flaw in PHP itself. In some server setups the attack can fire before WordPress even loads.
The hosting setup matters too. PHP rates the risk highest on Apache with mod_php, but PHP-FPM, CGI, FrankenPHP and LiteSpeed are all affected. If you run PHP 8.1 or older, the PHP project no longer issues regular updates, so you need a vendor-backed version or an upgrade.
How we handled it
Our sites run on servers we manage ourselves, not managed hosting, so nobody patched this for us. Our process:
- Inventoried every server and the PHP version actually serving traffic. We looked at the running PHP-FPM process on each server, not just the command-line
php -v, because the two can be different programs. - Checked for signs of compromise before changing anything, looking back to October 17. We checked for shells or tools launched by PHP workers, PHP files that did not belong in upload folders, PHP files changed since October 17, new executables in temporary folders, and unexpected scheduled jobs or accounts. We also compared WordPress core and plugin files against the official checksums. We found no signs of a break-in. A clean result is good news, not proof: an attacker who only read memory would leave no file behind.
- Confirmed recent backups. We confirmed that automatic disk snapshots existed and took fresh ones before patching.
- Patched one server at a time, with approval. We upgraded only the PHP packages, kept existing configuration, and had a rollback ready from the snapshot.
- Restarted PHP-FPM and verified the running version. This step is easy to miss. Installing a package does not change code already loaded in running worker processes, so we restarted the service and confirmed the running version afterward.
- Tested every site after the restart, both directly on the server and from the public internet.
Two things we learned along the way:
- Version numbers can mislead. Ubuntu and Debian often put the fix into a package without changing the upstream version number, so “8.5.4” can be fixed or not depending on the package build. We checked the vendor’s security advisory and the package changelog, not just the version label.
- Automatic updates helped on some servers and not on others. Two of our servers installed the fixed PHP on their own through the distribution’s automatic security updates. The servers that use a third-party PHP repository did not, so they needed manual patching. If you rely on a third-party repository, make sure it is covered by your update process.
What we ran into
From the first warning to the last server verified, the whole job took about two days, but almost all of that was checking, not patching. Reading the advisories, inventorying every server, and checking for signs of a break-in took most of a day. Once we had approval, patching the remaining servers took under an hour, including fresh backups and testing each site.
A few things surprised us:
- The version number was misleading. One server reported PHP 8.5.4 and looked unpatched, but Ubuntu had already put the fix into that package. We only knew because we checked the vendor advisory, not the version label.
- Two servers patched themselves. Their distribution’s automatic security updates installed the fix before we got to them. The servers using a third-party PHP repository did not, so those needed manual patching. We had assumed all of them would update on their own.
- Our own tests raised false alarms. Two sites looked broken in a direct test and turned out to be fine. One only accepts traffic that comes through Cloudflare, and the other was an old hostname that no longer exists. Testing from the public internet as well as from the server itself told us which was which.
- We found some housekeeping. While inventorying, we found an old, unused PHP version still running on one server and an operating system that had reached end of life. Neither was part of this issue, but we noted both for clean-up.
The biggest lesson: check the PHP version that is actually serving your site, not the one on the command line, and confirm the service restarted after the update.
Why this matters for your business
A successful attack here means someone else controls your web server: they can steal customer data, inject spam or malware into your pages, or use your server to attack others. For a site that earns leads or revenue through search, even a short compromise can mean Google warnings, lost rankings and lost trust, and recovery usually costs far more than a patch window.
What WordPress site owners should do today
- Ask your host whether the fixes for CVE-2026-109618 and CVE-2026-109619 are active. Many managed hosts patched automatically; self-managed servers need action.
- Self-managed? Patch and restart PHP. Then confirm the running version, not just the installed one. On Ubuntu and Debian, check the package changelog or the vendor advisory, since the version number alone can mislead.
- Look for signs of compromise, going back to October 17: shells or tools launched by PHP workers, unexpected PHP files in upload folders, and recently changed files.
- If you cannot patch right away, PHP lists turning off
session.upload_progress.enabledas a way to reduce exposure to CVE-2026-109619. WordPress does not normally use that feature. PHP is clear that it is a partial measure and not a substitute for the update. - Retire PHP 8.1 and older. Plan an upgrade to a supported branch.
- Keep layers in place: a firewall or WAF, rate limiting, current backups and log monitoring. A WAF in front of your site helps, but it only covers traffic that goes through it, and it does not replace the patch.
Frequently asked questions
Does updating WordPress fix the PHP vulnerability? No. The flaw is in PHP, so you need the PHP fix from your host or server.
Which PHP versions are patched? 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or your distribution’s backported equivalent. Older branches get no regular updates.
Will a WordPress security plugin protect me? Not from this. Plugins run inside PHP and cannot patch the runtime. They are still useful for other threats.
Is it being exploited? Yes. Amazon reported attempts from October 17, before the fix existed, and security vendors have reported attacks since. Treat it as urgent.
Do I need to restart anything after patching? Yes. Restart PHP-FPM or Apache so running processes load the patched code.
Sources:
- Ubuntu: php2shell fixes available (https://ubuntu.com/blog/php2shell-vulnerability-fixes-available)
- watchTowr: PHP remote code execution FAQ (https://www.watchtowr.com/intelligence/php-cve-2026-109618-faq/)
- Amazon security bulletin 2026-143 (https://aws.amazon.com/security/security-bulletins/2026-143-aws/)
- Tenable: php2shell FAQ (https://www.tenable.com/blog/php2shell-cve-2026-109618-cve-2026-109619-frequently-asked-questions-about-critical-php-remote)
- Greenbone: PHP2Shell (https://www.greenbone.net/en/blog/php2shell-remote-code-execution-cve-2026-109618-cve-2026-109619/)

Leave a Reply