Is My Website Vulnerable to PHP2Shell? How to Check Your PHP Version in 5 Minutes (No Developer Needed)


November 1, 2026

If you manage a website, you have probably heard something about the php2shell vulnerability by now. It is a pair of actively exploited PHP flaws (CVE-2026-109618 and CVE-2026-109619) that allow attackers to execute remote commands on servers that have not been patched. Both CVEs appear in the CISA Known Exploited Vulnerabilities (KEV) catalog [3], which means the threat is documented and real, not theoretical.

Before you can do anything about it, though, you need one straightforward piece of information: which version of PHP is your website running right now? If you want to know whether you are affected by PHP2Shell, the answer lives in that number.

This guide covers five ways to check the PHP version on your site, from the simplest hosting-panel click to a command-line query. None of these methods require you to be a developer. The whole process takes about two minutes per site.

Key Takeaways

  • PHP2Shell (CVE-2026-109618, CVE-2026-109619) is fixed in PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12. Any version below those builds is vulnerable [2].
  • Five methods exist for checking your version: hosting panel (cPanel MultiPHP Manager or Plesk), WordPress Site Health, a phpinfo() file, the command line (php -v), and response headers (X-Powered-By).
  • After confirming a vulnerable version, contact your web host immediately using the copy-paste template at the end of this post.
  • Your web server must be restarted after patching for the fix to take effect [1].
  • If you manage multiple sites, subdomains, or staging environments, a manual check on each one will likely miss something.

Checking one site is easy. Checking all of them isn’t.

Running through five methods manually for ten sites is slow, and it still leaves gaps. Staging environments, subdomains, and forgotten servers rarely make the list.

Scan all my sites

How do I check which PHP version my website uses?

Log in to your hosting panel (cPanel MultiPHP Manager or Plesk), open WordPress under Tools > Site Health > Info > Server, or run php -v in a terminal. If the version you see is below 8.2.35, 8.3.36, 8.4.27, or 8.5.12, your site is vulnerable to PHP2Shell and needs to be patched immediately.

Method 1: Hosting panel (cPanel / Plesk)

This is the easiest starting point for most people, and it works regardless of what software powers your website.

If your host uses cPanel:

  1. Log in to your cPanel account.
  2. Scroll to the Software section and click MultiPHP Manager.
  3. Your domains are listed with a PHP version column alongside each one. Note the version next to your domain.

If your host uses Plesk:

  1. Log in to Plesk.
  2. Click Websites & Domains.
  3. Select the domain you want to check.
  4. Find the PHP Settings section or the PHP version dropdown. Your current version is shown there.

Not sure which panel your host provides? Look at the URL you land on after logging in. cPanel typically connects on port 2083. Plesk addresses usually contain the word “plesk” in the URL path. If neither applies, a quick message to your hosting support team will get you the answer within minutes.

Method 2: WordPress Site Health

WordPress ships with a built-in PHP version checker. No plugin installation, no FTP access, no technical knowledge required.

  1. Log in to your WordPress admin dashboard.
  2. Navigate to Tools > Site Health.
  3. Click the Info tab.
  4. Expand the Server section.
  5. Find the row labeled PHP version and read the value.

The number you see is the PHP version running that specific WordPress installation. A value of 8.3.35, for example, falls below the patched build of 8.3.36 and is vulnerable.

One important limitation: Site Health only covers the single WordPress install you are logged into. If you have a staging environment, a subdomain install, or multiple sites under the same hosting account, each one needs to be checked separately. If that sounds like a lot of manual work, a dedicated PHP version scan covers all your properties in a single pass.

Method 3: phpinfo() file (and delete it after)

The phpinfo() function outputs a full page of server details, including the exact PHP version. This method works on any PHP-powered site, not just WordPress.

Step 1: Create the file. Open a plain text editor (Notepad on Windows or TextEdit on Mac). Type exactly this, and nothing else:

<?php phpinfo(); ?>

Save the file as phpinfo.php.

Step 2: Upload it. Using FTP or your hosting panel’s file manager, upload phpinfo.php to the root folder of your website. That is the same directory that holds your index.php or index.html.

Step 3: View the output. In your browser, navigate to https://yourdomain.com/phpinfo.php. The first large heading on the page will read something like PHP Version 8.3.35.

Step 4: Delete the file immediately. This step is not optional or something to come back to later. A phpinfo.php file left in place hands anyone on the internet a complete readout of your server configuration, which is precisely the kind of information attackers use during reconnaissance. Return to your file manager or FTP client and delete phpinfo.php before you do anything else.

Method 4: Command line (php -v)

If you manage a VPS, a dedicated server, or a shared hosting account that includes SSH access, this is the fastest check available.

Open a terminal and run:

php -v

The output will look something like this:

PHP 8.3.35 (cli) (built: Oct 15 2026 11:30:00)

Copyright (c) The PHP Group

The version number appears immediately after “PHP” on the first line. Write it down and compare it against the lookup table in the next section.

If you manage several servers, run this command on each one. PHP versions vary across machines even within the same organization, and one outdated server is all an attacker needs.

Method 5: Response headers

Every time a browser loads a page, the server sends back a set of response headers along with the content. Some servers include a header called X-Powered-By that identifies the PHP version in plain text.

How to check it:

  1. Open your website in Chrome or Firefox.
  2. Press F12 to open Developer Tools.
  3. Click the Network tab.
  4. Reload the page with F5.
  5. Click the first item in the request list (usually your domain name).
  6. Scroll through the Response Headers pane on the right and look for a line like: X-Powered-By: PHP/8.3.35

A quick note on reliability: many hosting providers and WordPress security plugins deliberately suppress or overwrite the X-Powered-By header to reduce the information available to attackers. If you do not see it, that is not confirmation of any specific version. It simply means this method will not work for your server. Fall back to one of the earlier methods in this guide.

Vulnerable or safe? Version lookup table

Use this table to determine your current exposure. The fixed builds come directly from the official PHP security advisory [2].

PHP Branch Vulnerable If Your Version Is Below Fixed (Safe) Build What to Do
PHP 8.5 8.5.12 8.5.12 Update to 8.5.12
PHP 8.4 8.4.27 8.4.27 Update to 8.4.27
PHP 8.3 8.3.36 8.3.36 Update to 8.3.36
PHP 8.2 8.2.35 8.2.35 Update to 8.2.35
PHP 8.1 All versions No patch available Upgrade to a supported branch
PHP 7.x and below All versions No patch available Upgrade to a supported branch

PHP 8.1 has passed its end-of-life date and no longer receives security patches of any kind. PHP 7.x has been out of support for longer still. If your site runs either of those versions, you are not dealing with a single fixable flaw. You are carrying a legacy PHP vulnerability that requires moving to a supported PHP branch before anything else can be addressed.

For sites running PHP 8.2 through 8.5, a patch exists. Once you have confirmed your version, follow the how to update PHP version steps for your specific hosting environment. After patching, your web server must be restarted for the fix to take effect [1]. This is not automatic. Confirm with your host that the restart has occurred, then re-check your version using any of the five methods above

Manual checks miss staging sites, subdomains, and forgotten servers.

SureShield’s PHP Scan finds every PHP endpoint you own, including the ones you have not thought about in two years.

Scan all my sites

What to send your web host (copy-paste message)

Once you have confirmed a vulnerable version, the next step is contacting your web host and requesting an update. Here is a message you can copy and paste directly. Fill in your current version before sending.

Subject: PHP Security Update Request (PHP2Shell / CVE-2026-109618 / CVE-2026-109619)

Hi,

I am writing to request an urgent PHP update for my hosting account. My site is currently running PHP [INSERT YOUR CURRENT VERSION HERE], which is below the patched builds released to address the PHP2Shell vulnerability (CVE-2026-109618 and CVE-2026-109619).

The fixed versions per the official PHP security advisory are:

  • PHP 8.5.12
  • PHP 8.4.27
  • PHP 8.3.36
  • PHP 8.2.35

Please update my account to the appropriate fixed build as soon as possible. Could you also confirm whether a server restart will be required after the update, and advise if there will be any expected downtime?

Thank you.

After your host confirms the update, re-check your PHP version using any of the five methods earlier in this post. The confirmation takes about two minutes and tells you the patch actually landed rather than assuming it did.

For a broader look at your site’s exposure beyond PHP, you can run a complimentary external vulnerability scan through SureShield’s SecurityShield TVM. It is a useful starting point for understanding your full risk posture. Persistent or complex vulnerability backlogs are also worth addressing through a structured threat and vulnerability management program rather than individual one-off fixes.

 

Related reading: How does PHP2Shell actually behave inside a WordPress site compared to Drupal or Magento? The wp2shell vs php2shell breakdown covers the platform-by-platform differences.

 

Found a vulnerable version? Confirm nothing else is exposed with a full PHP scan.

Check every site in one scan

FAQs

  1. Can I check PHP version without logging in?
  1. Yes. Open your site in a browser, press F12, click the Network tab, reload the page, then look at the Response Headers on the first request for a line reading X-Powered-By: PHP/x.x.x. Many servers suppress that header for security reasons, so the absence of it does not confirm a version. If you do not see it, use one of the four other methods in this guide.
  1. Does my host patch PHP automatically?
  1. Most shared hosting providers do not push PHP security patches automatically. Some managed WordPress hosts do apply updates, but you should not assume that has happened without checking. After any maintenance window your host mentions, re-run any of the five methods in this guide and confirm the version number matches a safe build.
  1. Is PHP 8.4.26 safe?
  1. No. PHP 8.4.26 is one version below the patched build of 8.4.27 and is vulnerable to PHP2Shell (CVE-2026-109618 and CVE-2026-109619) [2]. The fix is only present in 8.4.27 and above. Being a single minor version below the patched build still leaves the vulnerability fully open and exploitable.
  1. What does X-Powered-By show?
  1. The X-Powered-By response header identifies the server-side technology handling a request. When PHP sends it, you will typically see a value like PHP/8.3.36, which tells you the exact branch and version at a glance. Many hosting configurations strip this header deliberately to avoid exposing version information, so its absence does not indicate any specific PHP version.
  1. What should I ask my web host?
  1. Ask three specific questions: which PHP version is currently active on your account, whether they can update it to the patched build for your branch (8.2.35, 8.3.36, 8.4.27, or 8.5.12), and whether a server restart will be required after the update. The copy-paste message template above covers all three points in a format that gives your host everything they need to act.

Leave a comment

Your email address will not be published. Required fields are marked *