PHP2Shell: Critical PHP Vulnerability Fixed on 21 October 2026
No7 Engineering Team
Growth Architecture Unit

Update, 22 October 2026: the flaws are called PHP2Shell
The researchers have now published their findings under the name PHP2Shell. Wiz Research, OpenAI Codex Security and Calif reported the bugs, and the Wiz write-up describes remote code execution plus Heartbleed-style memory disclosure in the core PHP engine.
- Not limited to one CMS. WordPress, Drupal and Joomla were used to demonstrate unauthenticated remote code execution, but the vulnerable code is in PHP itself, so even a simple "Hello World" application on an affected runtime is exposed.
- Memory disclosure. An attacker may read PHP process memory, which can contain passwords, authentication tokens, API keys and certificates belonging to other requests or the server.
- Affected versions. The GitHub advisories list every release below 8.2.35, 8.3.36, 8.4.27 and 8.5.12 as affected, and the researchers say nearly every PHP version back to 5.4 is hit by at least one of the issues. Both are scored 9.2 with a network attack vector and no privileges or user interaction required, though attack complexity is high and specific conditions must be present.
- Distribution packages are out. Ubuntu has fixed packages for php8.1 on 22.04 LTS (8.1.2-1ubuntu2.28), php8.3 on 24.04 LTS (8.3.6-0ubuntu0.24.04.13) and php8.5 on 26.04 LTS (8.5.4-0ubuntu1.5), with php5 and php7.x packages covered through Ubuntu Pro. Debian has fixed php8.2 on bookworm (8.2.35-1~deb12u1) and php8.4 on trixie (8.4.27-1~deb13u1).
- Updating the application is not enough. The PHP2Shell site stresses that updating an application, whether WordPress, a plugin or Magento, does not update the PHP runtime beneath it. Install the fixed PHP, then restart Apache, PHP-FPM and any long-running PHP workers, such as queue consumers and other daemons.
Our view for stores: because process memory can leak, a public-facing server that ran an affected PHP version is worth treating as possibly exposed. After patching, rotate the secrets that server holds, such as payment gateway and ERP API keys, admin passwords and integration tokens, starting with anything that can move money or customer data.
Update, 21 October 2026: the fixed versions are out
The PHP project has published its security advisory. PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two critical vulnerabilities that can allow unauthenticated remote code execution, and the team strongly encourages all PHP users to update immediately. Every installation serving web requests is at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP team considers the risk highest for mod_php, with a demonstrated exploit where an unauthenticated request triggers the attack before any application code runs.
- CVE-2026-109618: remote code execution through out-of-memory corruption. Out-of-memory handling can interrupt PHP while internal request data is only partly initialised, and request cleanup may then treat that invalid data as valid.
- CVE-2026-109619: remote code execution through stale global state. Request-owned internal state can survive after its memory is freed, and a later request on the same worker may use it before normal initialisation resets it.
- Distribution packages: Linux distributions and LTS vendors received the patches in advance, so check your vendor for updated packages today.
- PHP 8.1 and older: no longer updated by the PHP project. Given the severity, the security team published minimal source backports for PHP 7.4, 8.0 and 8.1 for people who build from source; some distributions and LTS vendors also ship backported fixes.
- Remi repository: the PHP team says the volunteer-maintained rpms.remirepo.net will not have updates today and urges its users to switch to distribution packages or build from source.
A PHP vulnerability is a security flaw that attackers can use against software written in PHP. This time the two flaws are in the PHP runtime itself, the language engine that runs WordPress, WooCommerce, Magento and Adobe Commerce, not in a plugin or theme. On 20 October 2026 the PHP security team gave advance notice of a critical security release for 21 October 2026, fixing two vulnerabilities both rated 9.2 on CVSS v4.0. The fixes are now available, and every self-hosted PHP store should patch today.
What PHP announced about the two critical vulnerabilities
The advance notice gave the date and time, the number of vulnerabilities and their severity, and asked all PHP users to prepare now so they could upgrade as soon as the release was available. It also said the team might release earlier if details became public or if there was evidence of active exploitation.
The advisory itself now names both flaws: CVE-2026-109618 and CVE-2026-109619. Both can lead to unauthenticated remote code execution, which means an attacker does not need an account on the store. For a shop, that puts customer data, orders and payment-adjacent code at risk, so this is a same-day patch rather than a routine update.
PHP supported versions: which branches get the fix?
A PHP security update ships for supported branches. According to the PHP supported versions page, four branches are in support, and each now has a fixed release.
| Branch | Support status | Security support until | Previous release | Fixed release |
|---|---|---|---|---|
| PHP 8.5 | Active support | 31 December 2029 | 8.5.11 | 8.5.12 |
| PHP 8.4 | Active support | 31 December 2028 | 8.4.26 | 8.4.27 |
| PHP 8.3 | Security fixes only | 31 December 2027 | 8.3.35 | 8.3.36 |
| PHP 8.2 | Security fixes only | 31 December 2026 | 8.2.34 | 8.2.35 |
| PHP 8.1 and older | End of life | Ended 31 December 2025 (8.1) | 8.1.34 (last 8.1 release) | No release; source backports for 7.4, 8.0 and 8.1 only |
PHP 8.1 and older have reached PHP end of life, so the PHP project does not ship new releases for them. The source backports help teams that compile PHP themselves, and a distribution-packaged 8.1, for example on an older Ubuntu LTS, may get a vendor fix. Check your distribution's advisory, but treat the move to a supported branch as required. The supported versions page warns that users of end-of-life releases may be exposed to unpatched security vulnerabilities.
Does the PHP vulnerability affect Shopify, WooCommerce and Magento?
The work depends on who runs your PHP. On hosted platforms such as Shopify and BigCommerce, the merchant does not manage a PHP runtime for the store. Self-hosted WooCommerce, Magento Open Source and Adobe Commerce stores do. So does any custom PHP service around a hosted store, such as an ERP connector, a Laravel middleware or a custom app backend.
WooCommerce's server requirements recommend PHP 8.3 or newer, tested up to PHP 8.4, and warn that older legacy versions have reached end of life. For Adobe Commerce and Magento the PHP branch is tied to the platform release, according to Adobe's system requirements:
| Adobe Commerce / Magento release | Supported PHP versions | Can run a fixed PHP release? |
|---|---|---|
| 2.4.9 | PHP 8.5 | Yes, 8.5.12 |
| 2.4.8 | PHP 8.4, 8.3 | Yes, 8.4.27 or 8.3.36 |
| 2.4.7 | PHP 8.3, 8.2 | Yes, 8.3.36 or 8.2.35 |
| 2.4.6 | PHP 8.2, 8.1 | Only on PHP 8.2 (8.2.35) |
| 2.4.5 and 2.4.4 | PHP 8.1 | No upstream release; use a vendor backport (for example Ubuntu 22.04's php8.1 8.1.2-1ubuntu2.28) or the source backport |
That last row is the uncomfortable one. A Magento store still on 2.4.4 or 2.4.5 cannot move to a supported PHP branch without a platform upgrade first. For those stores, a backport buys time, and the advisory turns the platform upgrade into a project with a deadline. Stores on 2.4.6 with PHP 8.1 should move to PHP 8.2.35 now, because 2.4.6 already supports PHP 8.2. If the upgrade bill is close to a rebuild, our Magento to Shopify migration service is the alternative.
PHP version check: what to do today
Start with a PHP version check on every server, then patch in order of risk.
- Check the PHP version on every server. Run
php -von the server, or in WordPress open Tools, then Site Health, then the Info tab and the Server section, as WordPress's Update PHP page describes. Check the web PHP and the command-line PHP separately, because they can differ, and include staging, cron and queue workers. - Patch the servers that serve web requests first. Start with anything running mod_php, which the PHP team rates as the highest risk, then PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. Payment and admin servers come before the rest.
- Ask your host when the fix lands. If a host manages PHP for you, ask for the time they will install 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or the patched distribution package, and whether every worker is restarted.
- Patch today, with a quick test. Apply the fix the same day, test on staging if you can do it within hours, and run a checkout smoke test on the live store afterwards.
- Plan the upgrade for end-of-life servers. If a server is on PHP 8.1 or older, use a vendor or source backport now if one is available, and book the move to a supported branch. Upgrade the platform first if the current Magento or WooCommerce version does not support a newer PHP.
PHP security update: how to patch
Install 8.5.12, 8.4.27, 8.3.36 or 8.2.35 for your branch from your host or package manager, then restart PHP-FPM or the web server so every worker runs the new binary. On Debian, Ubuntu or Red Hat packages, check the distribution's security advisory or the package changelog. Distributions often backport fixes without changing the upstream version number. On Docker, rebuild the image from the patched base and redeploy every container that uses it.
To confirm the web side, a temporary phpinfo page shows the running version; delete it straight after. Then place a test order through checkout and watch the error logs. If WordPress reports that the PHP installation is missing the MySQL extension, the new PHP version needs mysqli; see our missing MySQL extension fix. Updating within the same branch is the right call today; a jump to a new branch belongs in a planned upgrade instead of an emergency window.
If you cannot update PHP today
The advisory is clear that only an update is a complete solution. It lists measures that reduce exposure to specific attack paths without making an installation safe, so use them only to bridge the hours before the patch. The full details are in the advisories for CVE-2026-109618 and CVE-2026-109619.
- For CVE-2026-109618: set
memory_limit=-1in a way applications cannot override, such asphp_admin_valuein the FPM pool or Apache configuration, and lowerpost_max_size(the advisory suggests 8M without uploads, 32M with them, withupload_max_filesizebelow it). Use a container or cgroup memory limit as the boundary; the advisory says not to substitute RLIMIT_AS or RLIMIT_DATA, as these can cause the vulnerable allocation failure. - For CVE-2026-109619: set
session.upload_progress.enabled=0in php.ini, the FPM pool or server configuration, not withini_set()or.user.ini, and restart every worker. Disabling upload progress blocks the confirmed session paths only, not other variants. On PHP 8.5, also setfatal_error_backtraces=0, which blocks the confirmed fatal backtrace path only.
On a WooCommerce or Magento store, check uploads and imports before you lower post_max_size, because product imports and media uploads may need more than 32M. That is one more reason to patch instead of relying on configuration.
How to update PHP in WordPress and WooCommerce
WordPress does not update PHP itself, because the server sets the PHP version. You update PHP in WordPress through your hosting control panel or your server's package manager; our step-by-step guide to updating PHP in WordPress covers each hosting type. Before you change branch, take a full backup, update WordPress, WooCommerce and every plugin, and test on a staging copy. After the switch, Tools, then Site Health, then Info, then Server shows the PHP version WordPress is actually using. WordPress itself recommends PHP 8.3 or newer on its Update PHP page.
Moving to the fixed release of the same branch is a small change. Moving to a new branch, for example from 8.2 to 8.3, needs a plugin and extension compatibility check first; our WooCommerce PHP compatibility guide walks through that test. If the host does not offer a supported branch, that is a reason to change host rather than wait.
What to do next
Run the version check now and patch every server on a supported branch to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your distribution's patched package, today, so this PHP vulnerability is closed. Put any PHP 8.1 or older server on a backport and an upgrade ticket with a date. For older Magento stores, our Magento upgrade cost versus replatforming comparison helps decide whether to upgrade or move. If you want the PHP upgrade done for you, our WooCommerce development team can scope it. The same week also brought a Node.js vulnerability fix and the Railway security breach, so check those runtimes and hosts too.
Frequently Asked Questions
The questions buyers and engineers ask us most about this topic.
What is PHP2Shell?
PHP2Shell is the name the researchers gave to CVE-2026-109618 and CVE-2026-109619, two memory-safety flaws in core PHP found by Wiz Research, OpenAI Codex Security and Calif. They can allow unauthenticated remote code execution and memory disclosure, and are fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
Should I rotate passwords and API keys after patching PHP2Shell?
The flaws can leak PHP process memory, which may hold passwords, tokens, API keys and certificates. Our view is that a public-facing server that ran an affected version should rotate its secrets after patching, starting with payment gateway, ERP and admin credentials.
Which PHP versions fix CVE-2026-109618 and CVE-2026-109619?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October 2026, or your distribution's patched package. Both flaws can allow unauthenticated remote code execution, and the PHP team strongly encourages all users to update immediately.
Is my PHP setup affected by the October 2026 PHP vulnerability?
All PHP installations serving web requests are at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP team rates mod_php as the highest risk, with a demonstrated exploit that runs before application code.
What if my server runs PHP 8.1?
PHP 8.1 no longer gets releases from the PHP project. The security team published minimal source backports for 7.4, 8.0 and 8.1, and some distributions and LTS vendors ship backported fixes. Use one now and plan the move to a supported branch.
How do I check and update PHP in WordPress?
Check the version under Tools, Site Health, Info, Server. The PHP version itself is changed in your hosting control panel or on the server, not inside WordPress, after a backup and a plugin compatibility test on staging.
Do Shopify or BigCommerce stores need to patch PHP?
Not for the store itself, because merchants on hosted platforms do not manage its PHP runtime. Self-hosted WooCommerce, Magento and Adobe Commerce stores must patch, and so must any custom PHP service around a hosted store, such as an ERP connector or app backend.
Does the PHP vulnerability affect Shopify?
On hosted platforms such as Shopify and BigCommerce, the merchant does not manage a PHP runtime for the store. Custom PHP services around a hosted store, such as an ERP connector or Laravel middleware, still need patching. Self-hosted WooCommerce, Magento Open Source and Adobe Commerce stores need the fixed PHP versions.