On 21 October 2026, the PHP project released security updates for two critical vulnerabilities collectively known as PHP2Shell. Under certain conditions, an attacker could run code on an affected web server without logging in. If you run WordPress, Drupal, Joomla, Moodle or a Laravel application, start by checking which PHP build actually serves your website.
The fix depends on how PHP was installed. Your hosting provider may already have applied the patch, your Linux distribution may have issued a security update under the same PHP version number, or you may need a separate package for a legacy server. Even teams still running PHP 7.4 on CentOS 7 have a patch option through GetPageSpeed while they plan a migration.
What is PHP2Shell?
PHP2Shell refers to CVE-2026-109618 and CVE-2026-109619. Both affect the PHP runtime, the software that executes PHP code on a server. The first involves how PHP handles memory when it runs out. The second involves internal information that PHP can retain after the memory it refers to has been released. Both can lead to remote code execution.
For website owners, the practical question is which PHP build the application uses. Two WordPress sites running the same WordPress release can have different exposure if they use different PHP builds. Keeping WordPress and its plugins up to date is part of routine maintenance. Fixing PHP2Shell requires updating the PHP runtime that serves the site.
How dangerous is the PHP2Shell vulnerability?
Both vulnerabilities were rated Critical, with a CVSS 4.0 score of 9.2. Unauthenticated remote code execution means an attacker can potentially make the server run code without first signing in. What they can access depends on the permissions of the affected PHP process. That may include application files, configuration secrets and databases the application can reach.
The PHP project identified Apache with mod_php as the highest-risk configuration in its advisory. Its guidance also covers other PHP installations that serve web requests, including PHP-FPM, PHP-CGI, FrankenPHP and LiteSpeed. The Cyber Security Agency of Singapore reported widespread exploitation attempts and urged organisations to prioritise internet-facing systems.
Start with public-facing sites and applications. Include older sites, staging environments and admin interfaces if they can be reached from the internet. Those systems can be easy to miss when the team’s update process focuses on the main production application.
Which PHP versions and websites are affected?
The PHP project published the following releases on 21 October 2026. These were the first releases in their respective branches to address both PHP2Shell vulnerabilities. For a current deployment, use the security release recommended by the source that supplies your PHP packages.
| PHP branch | First release from the PHP project with both fixes |
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
Check the PHP build serving each website
One server can run several PHP versions. Your terminal may show PHP 8.4 when you run php -v, while an older site on the same server still uses PHP 7.4 through a separate PHP-FPM pool. Check the runtime assigned to each website in your hosting panel or server configuration. If several servers or containers handle traffic for the same site, check each of them.
Check the full package release
A Linux distribution or hosting provider can apply a security fix to an older build while retaining its original PHP version number. This is called backporting. If your PHP build comes from a distribution, hosting provider or third-party repository, compare the full package release with that provider’s advisory for both CVEs. The table above gives you the PHP project’s release numbers. Your provider’s advisory tells you which of its own packages contains the fix.
How do you fix the PHP2Shell vulnerability?
Shared or managed hosting
Check your provider’s security notice or contact support. Ask which PHP build serves your site and whether that build includes fixes for CVE-2026-109618 and CVE-2026-109619. If your account hosts several sites, ask for confirmation for each domain, especially any site pinned to an older PHP version. Hosting providers such as Namecheap tracked mitigation and deployment through their own service notices.
You can send your provider this question:
Can you confirm which PHP build is serving my domain and whether it includes fixes for CVE-2026-109618 and CVE-2026-109619? If the current build is still affected, which patched version should I switch to?
If you change the PHP version in your hosting panel, test the parts of the site you depend on, such as login, checkout, form submissions and scheduled tasks. Ask the provider to confirm the new runtime if the panel only displays the PHP branch.
Self-managed servers and containers
On a virtual or dedicated server, identify where PHP came from. It may be installed through your operating system’s repository, a hosting control panel or a separate package repository. Find the security update for that package source and apply it to every affected PHP installation serving web traffic. Restart the service that runs PHP so it loads the updated build. For example, restart the relevant PHP-FPM service if the website uses PHP-FPM, or the web server if it loads PHP through Apache mod_php.
For a containerised application, update the base image or PHP package used to build the container. Build and deploy the updated image, then confirm that all replicas serving traffic have moved to it. Updating PHP on the host leaves the application’s container image unchanged.
After deployment, verify two things. First, confirm that the live website is using the patched build. Then run through the application’s essential functions. On a server with several PHP installations, a successful update on one site can leave another site running its original build.
Legacy Linux systems
A legacy server can be fully up to date according to its configured repository and still be missing the PHP2Shell fix. For example, Remi stopped building PHP packages for CentOS 7 in June 2024. If a server still relies on those packages, a routine update against the old repository will leave it on the last build that repository supplied.
GetPageSpeed’s Everpatch packages bring the PHP2Shell fix to older PHP branches and Linux releases. GetPageSpeed publishes signed RPM packages for CentOS 7, including builds for PHP 7.3, 7.4 and 8.0. It also documents patches for CentOS 6 and selected Ubuntu, Debian and Amazon Linux installations. Check the operating system and PHP branch together when looking up a package.
| Linux release | Examples of PHP branches GetPageSpeed lists for that release |
| CentOS 7 | 7.3, 7.4 and 8.0, among other branches |
| CentOS 6 | Stock 5.3, plus 7.0 and 7.1 in Remi-compatible packages |
| Ubuntu 20.04 | 7.4, 8.0, 8.1, 8.2, 8.3 and 8.4 on amd64 |
| Ubuntu 18.04 | 7.2 on amd64 |
| Debian 10 | 7.3 on amd64 |
| Amazon Linux 2 | 7.2 and 7.4 |
Worked example · PHP 7.4 on CentOS 7
Suppose an older application uses PHP 7.4 on CentOS 7 and needs more time to move to a supported platform. GetPageSpeed documents two ways PHP 7.4 may be installed in this setup. It can be the system PHP, with packages named php-*, or a separate installation alongside other PHP versions, with packages named php74-php-*. Both may report PHP 7.4, so start by identifying the package family and service assigned to the site.
Match that package family to the vendor’s current documentation and check the terms for commercial production use. Once you’ve applied the update, restart the corresponding PHP service and verify its full package release. Test any PHP extensions the application depends on, along with the business functions that need to keep running during the migration. The patch gives teams a way to address these two CVEs while they plan and test the move to a supported PHP and Linux release.
If you cannot patch immediately
Reduce access to the affected service while you arrange the update. For a private application or admin interface, restrict access to authorised networks where possible. For a public service that cannot be adequately protected, temporarily taking it offline may be appropriate. PHP’s advisory says available mitigations are incomplete, so apply a fixed build as soon as your environment allows.
What should you check after patching?
Once you’ve confirmed the patched build is live, review the period when the service may have been exposed. Check web server, PHP and hosting logs for unusual activity. Look for unexpected file changes, unfamiliar processes or unexplained outbound connections. If your provider manages the server, ask what logs they can review and whether they observed unusual activity affecting your sites.
If you find suspicious activity, preserve the available logs and escalate to your incident response team or hosting provider. Depending on what they find, the response may include isolating the host, rotating exposed credentials or rebuilding the affected system. The patch closes the vulnerability going forward. The investigation helps establish what may have happened before the update.
Frequently asked questions
Does PHP2Shell affect WordPress?
Yes, if WordPress runs on an affected PHP build. Check which PHP runtime serves your domain and confirm that it includes both fixes.
Does updating WordPress or its plugins fix PHP2Shell?
The PHP runtime needs the security update. If your hosting provider manages PHP, ask them to confirm the patched build is active for your site.
Can I patch PHP2Shell on a legacy Linux server without upgrading the operating system immediately?
Yes, if a provider ships a patched package for your exact combination of operating system, PHP branch and package family. GetPageSpeed’s PHP 7.4 packages for CentOS 7 are one example. Check the vendor’s coverage before applying an update.
Why does my PHP version still look the same after applying a security update?
Your provider may have backported the fix and changed only the package release number. Compare the full release number with the provider’s advisory, then confirm that the running web service has loaded the updated build.
Running an older PHP application? Talk to Hodfords about your patch options and how to plan the upgrade.
