Insights
PHP2Shell and Magento 2.4.4/2.4.5: what to do if you are stuck on PHP 8.1
PHP2Shell is two flaws in PHP itself, not Magento, so the fix is a PHP update, and stores on 2.4.4 or 2.4.5 need a patched PHP 8.1 build now and an upgrade plan next.
- nginx
- PHP
- MariaDB or MySQL
- OpenSearch
- Valkey or Redis
- Varnish
What PHP2Shell is
PHP2Shell is the security industry's name for two vulnerabilities in the PHP runtime, published by the PHP project on 21 October 2026. PHP does not use that name. It calls them RCE via OOM corruption (CVE-2026-109618) and RCE via stale global state (CVE-2026-109619). Both can allow unauthenticated remote code execution.
PHP rates both 9.2, critical, on CVSS v4.0. The National Vulnerability Database scores them separately on CVSS 3.1: 9.8 for CVE-2026-109618 and 8.1 for CVE-2026-109619. PHP says they affect "all PHP installations serving web requests", naming PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, with the highest risk on mod_php. Fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released on 21 October 2026.
On 26 October 2026 CISA added both CVEs to its Known Exploited Vulnerabilities catalog, meaning it has evidence of exploitation in the wild. No authoritative source reports attacks aimed specifically at Magento stores. For the background, see our full PHP2Shell guide.
Who is affected
| Magento | Supported PHP | Fixed PHP to use |
|---|---|---|
| 2.4.9 | 8.5 | 8.5.12 |
| 2.4.8 | 8.4, 8.3 | 8.4.27 or 8.3.36 |
| 2.4.7 | 8.3, 8.2 | 8.3.36 or 8.2.35 |
| 2.4.6 | 8.2, 8.1 | 8.2.35 |
| 2.4.5 | 8.1 | Patched vendor build only |
| 2.4.4 | 8.1 | Patched vendor build only |
PHP versions are from Adobe's system requirements, which are set per patch level, so check the exact patch release your store runs.
Stores on 2.4.4 and 2.4.5 are the hard case. Those releases support only PHP 8.1, which reached end of life on 31 December 2025 and received no fixed release. PHP published minimal source backports for 7.4, 8.0 and 8.1 as branches in its source repository, for "people building from source or without access to an LTS vendor", and directs everyone else to their vendor: "Some distributions and LTS vendors provide backported fixes, so contact your vendor for details, or upgrade to a supported version."
Why a Magento patch cannot fix this
The flaws are in PHP, not Magento code. A Magento security patch, a later patch release on the same PHP, or an extension update does not change the PHP runtime. The update has to come from whoever provides your PHP packages.
When a vendor backports a fix to PHP 8.1, the version number does not change, so php -v proves nothing. Patched builds report what they always reported: Ubuntu 22.04 reports 8.1.2 (USN-8948-1, package 8.1.2-1ubuntu2.28) and AlmaLinux 9's php:8.1 module reports 8.1.32. The proof is the package changelog, and the package name differs by platform: ea-php81-php-common on cPanel EasyApache 4, php81-php-common for a Remi Software Collection, alt-php81-common on CloudLinux alt-php, php8.1-common on Ubuntu. Some vendors name no CVE IDs in changelogs, in which case the version is the only check. Restart every PHP worker afterwards.
Two things before you go looking: Debian ships no php8.1 package, so PHP 8.1 there comes from a third-party repository, and Remi has no patched PHP 8.1 either.
If you are on 2.4.4 or 2.4.5, ask your host to confirm in writing which PHP 8.1 package each environment runs, that it carries the fix for CVE-2026-109618 and CVE-2026-109619, and that all PHP workers were restarted.
Interim measures, and their limits
PHP is explicit that these reduce exposure and nothing more: "There are no complete mitigations, updating is the only safe choice."
PHP's advisory lists the measures, including a memory_limit change, with a warning not to substitute RLIMIT_AS or RLIMIT_DATA, "as these can cause the vulnerable allocation failure". Getting this wrong makes things worse, so read PHP's advisory rather than a summary, and have whoever runs your server apply it.
Two Magento-specific points. Magento ships five files that set memory_limit, all at 756M, including .user.ini in the root and in pub, and a PHP-FPM pool php_value will not override .user.ini, so a change needs php_admin_value. Separately, PHP advises keeping session.upload_progress.enabled=0 until its next regular bugfix release, under CVE-2026-115560, announced but not yet published in full. Magento's own code contains no reference to session upload progress in 2.4.4, 2.4.5 or current development, so switching it off is not expected to affect the store. Third-party extensions were not surveyed.
Upgrade path
- Now: run a patched PHP 8.1 build from your distribution or an LTS vendor, confirmed by the package changelog or version, with workers restarted.
- Next: plan the move off 2.4.4 or 2.4.5 to Magento 2.4.8 or 2.4.9. Adobe's standard support ended on 12 April 2025 for 2.4.4 and 12 August 2025 for 2.4.5, and the security-only period running to 31 May 2027 applies to Adobe Commerce licences, not Magento Open Source.
- Do not stop at PHP 8.2. It reaches end of life on 31 December 2026, and Adobe's own lifecycle policy flags PHP 8.2 as putting PCI compliance at risk from the end of 2026.
- Test on staging first, then move PHP and Magento together.
What to ask, whoever hosts you
Treat this as a hosting question first. Ask which PHP package each environment runs, whether it carries the fix, and when the workers were last restarted. Then book the Magento upgrade, so you are not depending on an end-of-life PHP branch.
On Adobe Commerce cloud infrastructure, Adobe places responsibility for keeping platform services on supported versions with the merchant, the PHP runtime included, while version changes are carried out by Adobe at your request through a support ticket. Ask Adobe which PHP patch release your environments run.
If you are looking to move, we will take on a 2.4.4 or 2.4.5 store as it stands. We would rather host an older store properly than leave it where nobody is watching it, and we will not make the upgrade a condition of moving. We will encourage you to plan that upgrade, either with your own developer or with us, because an end-of-life PHP branch is a position you want to leave rather than settle into.
This page is general technical guidance based on public sources. It is not an assessment of any particular store.
For how we handle upgrade planning and patch windows, see Magento upgrades and security patching.
Sources
All accessed 3 November 2026.
- PHP security advisory and release announcements, October 2026
- GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp
- NVD CVE-2026-109618 and NVD CVE-2026-109619
- CISA Known Exploited Vulnerabilities catalog, both CVEs added 26 October 2026
- PHP supported versions
- Adobe Commerce system requirements and lifecycle policy
- Adobe Commerce shared responsibility
- Ubuntu USN-8948-1
Frequently asked questions
Stuck on Magento 2.4.4 or 2.4.5?
If you want the PHP position checked and the upgrade to 2.4.8 or 2.4.9 planned properly, we can go through it with you and your developer.