Insights / Threads
PHP2Shell, the flaw underneath WordPress and Magento
If your website runs on PHP and nobody has checked its version since 21 October 2026, the safe assumption is that it is exposed. PHP2Shell is not a WordPress bug, a Magento bug or a plugin bug. It is a bug in the PHP interpreter itself, which makes it the incident that separates websites with real maintenance from websites that merely have hosting.
The flaw is in the interpreter, not the application
PHP2Shell is the name given to two vulnerabilities in the PHP interpreter, CVE-2026-109618 and CVE-2026-109619. The PHP security team rated both critical, CVSS 9.2, and shipped emergency releases on 21 October 2026, a day earlier than planned, because the details had leaked on social media the evening before. Both allow an attacker with no credentials to execute code on the server. The first comes from memory corruption when PHP runs out of memory halfway through setting up a request. The second comes from global state that outlives one request and contaminates the next one handled by the same worker.
What makes it different from the vulnerability of the week is where the bug lives. It is not in one application, it is underneath all of them. That is why CISA issued an alert the same day asking for immediate patching, why watchTowr saw exploitation attempts in its honeypot network on that same 21 October, and why Patchstack was documenting active incidents reported by hosting partners within hours, including a campaign that installed backdoors on WordPress sites through UpdraftCentral keys. Wiz Research, who reported the bugs, demonstrated unauthenticated code execution against the latest WordPress, Drupal and Joomla container images. Several European public services went offline as a precaution while they updated.
Any site that serves PHP is affected, whatever the CMS
Every PHP installation that serves web requests. It does not matter whether it runs as PHP-FPM, as an Apache module (mod_php, the case PHP considers highest risk because the attack can land before the application code runs), as php-cgi, under FrankenPHP or under LiteSpeed. And therefore everything built on top. WordPress and WooCommerce, Magento and Adobe Commerce, Drupal, Joomla, Laravel, PrestaShop, Moodle, or any bespoke PHP application.
The useful question is not which CMS you run, but which PHP branch serves each site and whether that branch has a fix.
| PHP branch | Fixed release | Status |
|---|---|---|
| 8.5 | 8.5.12 | Active support. Update. |
| 8.4 | 8.4.27 | Active support. Update. |
| 8.3 | 8.3.36 | Security fixes only until 31 December 2027. Update. This is the branch we are moving the platforms we maintain to. |
| 8.2 | 8.2.35 | Security fixes only until 31 December 2026. Update now and plan the move to 8.3 or 8.4 before year end. |
| 8.1, 8.0 and 7.4 | No official release | End of life. PHP published minimal source backports and distributions (Debian, Ubuntu, RHEL) are shipping them in their packages. Check the package changelog, not the version number. |
| 7.3 and older | No fix | There will be no fix. The only way out is migrating to a supported branch. |
Ten minutes is enough to tell whether a site is patched
What matters is the version serving your domain, not the one on the hosting plan’s spec sheet. These checks go from most reliable to most indirect.
- Server terminal.
php -vprints the command line version. If the site is served by PHP-FPM, also runphp-fpm -v(orphp-fpm8.3 -vdepending on the distribution), because several can coexist. In containers,docker exec name php -v. - Distribution packages. On Debian and Ubuntu,
apt changelog php8.2-fpmand search for the CVE. On RHEL, Rocky or Alma,dnf updateinfo info --cve CVE-2026-109618. It is the only way to know whether an old branch carries the backported fix. - From the application itself. In WordPress, Tools, Site Health, Info tab, Server section. With WP-CLI,
wp eval 'echo PHP_VERSION;'. In Drupal, the status report. In Magento,php -vas the user that runsbin/magento. In Laravel,php artisan --versionalso prints the PHP version. - Hosting control panel. Plesk, cPanel and hosting providers’ PHP selectors show the branch assigned to each domain. Make sure the full version, third number included, is the fixed one or higher.
- HTTP headers.
curl -sI https://yourdomain.com | grep -i x-powered-bysometimes returns the version. If it does not, that tells you nothing. Many setups hide it, rightly so. - If a third party manages it. Ask for three things in writing. The exact PHP version serving your domain, the date it was updated, and confirmation that PHP processes were restarted afterwards. If the answer is “the server is up to date” with no version number, push back.
Without the patch, order matters more than speed
When the check returns an unpatched version, the temptation is to update the main site and call it done. The procedure we follow has eight steps, and the first one is not updating.
- Inventory. List every PHP installation, not just the main site. Staging, subdomains, intranets, old forms, forgotten instances on another server. The sites nobody remembers are the ones that get exploited.
- Prioritise. Internet-facing first, and anything running as an Apache module. Then the rest.
- Verified backup before touching anything. Files and database, stored off the server.
- Update in staging and test what usually breaks when you change branch. Old plugins, missing PHP extensions, deprecation notices in bespoke themes. If you are jumping from 8.1 to 8.3, our thread on tuning up a WordPress site covers what to review in the same pass.
- Update production and restart every PHP process. Without the restart the fix is not applied, even if the package is.
- Verify and keep the evidence. Repeat the checks from the previous section and save the dated result.
- If you cannot update today, shrink the attack surface. Restrict access from the internet, put the site in maintenance mode if it is critical, and review logs since 20 October for odd multipart requests followed by memory errors or 500 responses, malformed PHPSESSID cookies, or unexplained worker restarts. Patchstack lists these as indicators, not proof.
- If there are signs of compromise, treat the server as compromised. Rotate every credential it held (database, APIs, SMTP, UpdraftCentral keys if you use them) and consider restoring from a backup taken before 20 October.
What looks like a fix but is not
- Do not rely on the security plugin. It runs inside the vulnerable PHP. It can warn you, it cannot fix anything.
- Do not install “patches” as code snippets or unofficial plugins that promise a fix. Patchstack has already warned they are circulating.
- Do not treat configuration mitigations as a fix. Tuning
memory_limit,post_max_sizeor disablingsession.upload_progresslowers the risk while you update, but PHP has been explicit that no configuration change removes it. - Do not update only the main site. The staging instance sharing the same database is just as good a door.
- Do not wait for this month’s maintenance window. This time exploitation started the same day as the patch.
A CISA alert takes hours when there is a method
On the public platforms we maintain, for a university and two public administrations, with WordPress and Magento sites spread across several hosts, PHP2Shell was not handled site by site as the alerts arrived. Everything was inventoried first, ranked by exposure and moved to the same long-support branch, PHP 8.3. What took longest were instances missing from the client’s own inventory.
The gap between a week like that and a week of guesswork is decided before the incident, and it is the argument of our hub on PHP website maintenance. It also answers whether WordPress is still worth it. It is, when someone behind it turns a CISA alert into an update within hours. That someone can be an in-house team or our enterprise WordPress service. What does not work is nobody.
Frequently Asked Questions
PHP2Shell is the name given to two vulnerabilities in the PHP interpreter itself, CVE-2026-109618 and CVE-2026-109619, published on 21 October 2026 with emergency releases. They let an unauthenticated attacker run code on the server. It is not a WordPress or plugin bug. Any site running on an unpatched PHP version is affected, whatever CMS sits on top.
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older branches get no official release, so on those you depend on your Linux distribution or hosting vendor backporting the fix into their package. PHP 7.3 and older will not be fixed at all and need to be migrated.
Ask for specifics. The exact PHP version serving your domain, not the server in general, and confirmation that PHP worker processes were restarted after the update. On shared hosting several PHP branches coexist and it is common for one domain to stay on an old branch even though a patched one is installed.
No. A plugin runs inside the vulnerable interpreter, so it cannot fix the interpreter. Security plugins may help you spot unusual activity, but the only complete fix is updating PHP to a patched release and restarting the workers. Be wary of code snippets or unofficial plugins that claim to patch it.
There is no single reliable indicator. Patchstack lists signs worth checking in logs since 20 October 2026, such as unusual multipart requests followed by memory errors or HTTP 500 responses, malformed PHPSESSID cookies and unexplained PHP worker restarts. If you find them, treat the server as compromised, rotate every credential it held and consider restoring from a backup taken before 20 October.
To go from theory to practice
Enterprise WordPress, up to date. Built for the business you run.
More information