GuideSSL & security
The PHP2Shell vulnerability: what to check in cPanel
- Reading time
- 10 min
- Last updated
- 27 Oct 2026
On 21 October 2026 the PHP project fixed two critical flaws, CVE-2026-109618 and CVE-2026-109619, known together as PHP2Shell. Either can let an attacker run code on a web server without logging in. The fix is a newer PHP build, not a plugin or a setting. This guide explains what happened and how to check which PHP version your site runs in cPanel.
What happened
The PHP project announced a critical security release on 20 October 2026 and published PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 the next day. Each fixes the same two flaws, described in PHP's advisories of 21 October:
- CVE-2026-109618, "RCE via OOM corruption". If PHP runs out of memory while it is still setting up a request, some of the request's internal data is left half-built, and the cleanup that follows can treat it as valid.
- CVE-2026-109619, "RCE via stale global state". Internal data from one request can outlive the memory behind it, and a later request handled by the same PHP process can use it.
Either can lead to remote code execution: someone with no login sends crafted requests and runs code on the server as the account PHP runs under. PHP rates both 9.2 out of 10 (critical) on CVSS v4.0. The US National Vulnerability Database scores them 9.8 and 8.1 on the older CVSS 3.1 scale.
The flaws are in PHP itself, not in WordPress or any plugin. Wiz, one of the research teams that reported them, says it ran code without a login on WordPress, Drupal and Joomla, and that even a simple "Hello World" page on an affected PHP version can be vulnerable.
Amazon's threat intelligence team recorded an exploit attempt against its decoy servers on 17 October 2026, four days before disclosure, and says it is unclear whether the attempts it saw before disclosure would have succeeded on real systems. Once the fix was released on 21 October, public exploit code appeared within hours, and Amazon reported broad exploitation attempts. On 26 October the US agency CISA added both flaws to its Known Exploited Vulnerabilities catalogue.
Who is affected
Versions. On the supported branches, every release below 8.2.35 on 8.2, 8.3.36 on 8.3, 8.4.27 on 8.4 and 8.5.12 on 8.5 is affected. The US National Vulnerability Database lists CVE-2026-109618 as affecting PHP from 7.3.0 and CVE-2026-109619 from 5.4.0, so PHP 7.4, 8.0 and 8.1 are affected by both. PHP 8.1 and older no longer get releases from the PHP project, so there is no 7.4, 8.0 or 8.1 release with the fix (more below).
Setups. PHP says all installations that serve web requests are affected, naming PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. It rates the risk highest on mod_php, where a working exploit has been shown, and its advisory for CVE-2026-109619 also reports a working exploit on PHP-FPM. For LiteSpeed's PHP interface (LSAPI), PHP's advisory for CVE-2026-109618 says exploits that depend on the specific application are likely but have not been validated. For CVE-2026-109619, the advisory names LSAPI a "conditional candidate" for one attack path. Its confirmed session-upload-progress attack was shown working on mod_php and PHP-FPM, and the advisory does not rule LiteSpeed out. Our cPanel plans run on LiteSpeed. Whatever the setup, the fix is a PHP build that includes the patch.
Who updates PHP. On shared, WordPress, cloud and reseller hosting, the PHP builds on the server are installed by the host. In cPanel you choose the branch, such as 8.3; which release of that branch you get depends on what is installed. On a VPS or VDS where you have root, PHP is updated by whoever manages the server, which on an unmanaged plan is you.
How to check your PHP version in cPanel
You need the full version number, such as 8.3.36, not just the branch. cPanel shows the branch; a one-line file or WordPress shows the full number.
- See which branch the site uses. In cPanel, open Software → Select PHP Version and read the version next to Current PHP version. If it shows native, the version comes from Software → MultiPHP Manager instead, which lists each domain with the version it uses.
- Read the full number. In File Manager, create a file in the site's folder (
public_htmlfor the main domain). Give it a random name you make up yourself, letters and numbers ending in.php, not a name copied from this page. Put just<?php echo PHP_VERSION;in it. Openhttps://yourdomain.in/followed by that file name in a browser. It prints the version that domain actually runs, for example8.3.36. On WordPress you can skip the file: go to Tools → Site Health → Info, open Server and read PHP version. - Delete the file once you have the number. There is no reason to leave it public.
- Repeat for each domain if you host more than one. MultiPHP Manager can give a domain its own version.
What the number means:
- 8.2.35, 8.3.36, 8.4.27, 8.5.12, or later in the same branch: the release includes the fix.
- A lower number in the same branch, such as 8.3.35: not proof either way. Some vendors, CloudLinux among them, ship the fix as a backport inside a build that keeps the older number. Message us on WhatsApp (24/7) or open a ticket, and our support team will confirm whether the PHP build your site uses carries the fix for CVE-2026-109618 and CVE-2026-109619.
- 7.4, 8.0 or 8.1: the number cannot tell you, because these branches get no new releases. See the next two sections.
How to move to a fixed version
Fixed builds reach a shared server through the host's package updates. What you choose in cPanel is the branch, so the move that matters is off a branch with no official fix (7.4, 8.0 or 8.1) onto one with fixed releases. Prefer 8.3: PHP supports it with security fixes until 31 December 2027, while support for 8.2 ends on 31 December 2026. Already on 8.3? You do not need to switch; check the number as above.
- Back up first. See how to back up a website in cPanel.
- Update the site. Update WordPress, plugins and the theme, or your framework, before changing PHP. Old plugins are the usual reason a newer PHP version breaks a site.
- Switch to 8.3. In Software → Select PHP Version, choose 8.3 next to Current PHP version. Then open Software → MultiPHP Manager and make sure the domain is set to inherit; a domain pinned to a version there ignores Select PHP Version. The full walkthrough, with extensions, is in how to change the PHP version in cPanel.
- Check the number again with the file from the previous section, then delete the file.
- Test the site. Load a few pages, log in to the admin area and submit a form. If something breaks, the
error_logfile in the site's folder names the cause, and switching back takes effect on the next page load.
If the number is still below the fixed release after switching, message us on WhatsApp (24/7) or open a ticket, and our support team will confirm whether the PHP build your site uses carries the fix for CVE-2026-109618 and CVE-2026-109619.
If your site needs PHP 7.4, 8.0 or 8.1
These branches are past their end of life: 7.4 since 28 November 2022, 8.0 since 26 November 2023 and 8.1 since 31 December 2025. The PHP project did not release fixed versions of them. Its security team published minimal source backports for 7.4, 8.0 and 8.1 for people who build PHP themselves; distributions and long-term-support vendors ship their own backported builds. A backported build keeps the old version number (7.4.33, for example), so the number cannot tell you whether your build has the fix. Message us on WhatsApp (24/7) or open a ticket, and our support team will confirm whether the PHP build your site uses carries the fix for CVE-2026-109618 and CVE-2026-109619.
The lasting fix is to move up to 8.3:
- Update plugins, the theme or the framework first. If a plugin has no version that runs on PHP 8, replace it.
- Switch to 8.3 and test, as above. If a page fails, the
error_lognames the file at fault. Fix or replace that code, and switch back while you do. - If a developer built the site, ask them for a version that runs on PHP 8.3. If you are stuck, message us with the error and we will look at it.
Sources
- PHP project, 21 October 2026: the security announcement and advisories GHSA-w8hw-w9fx-j79w (CVE-2026-109618) and GHSA-6wmf-4rv5-p3rp (CVE-2026-109619). Support dates from PHP's supported versions and unsupported branches pages.
- US CISA, alert of 21 October 2026, revised 26 October. National Vulnerability Database records for CVE-2026-109618 and CVE-2026-109619.
- Amazon Threat Intelligence, PHP2Shell exploitation before public disclosure, 21 October 2026.
- Wiz Research, PHP2Shell write-up, 21 October 2026.
- CloudLinux, fixed alt-php and ea-php packages, updated 23 October 2026.
Common questions
→Read next
→Get started
Questions about your PHP version? Ask us.
Free SSL and managed migration on cPanel plans, and engineers on WhatsApp chat, 24/7, with a first reply in under 2 minutes.