← PatchMyPHP blog

How to check if your website is vulnerable to PHP2Shell

By PatchMyPHP ·

To check whether your website is vulnerable to PHP2Shell, find the PHP version it actually runs and compare it with the fixed releases, 8.5.12, 8.4.27, 8.3.36 and 8.2.35. A version at or above the fix on its branch is patched; anything older, and every site on PHP 8.1 or older, is exposed. Here are three reliable ways to find out.

PHP2Shell (CVE-2026-109618 and CVE-2026-109619, both rated 9.2 (CVSS v4.0, PHP's rating)) lets an attacker run code on the server without logging in, so the first step for any PHP site is simply knowing which version is serving requests. The catch is that the version a site shows the outside world is not always the version running, so it helps to confirm from more than one angle.

Start here: the free checker

Read-only: one standard page request, like a browser visit. We never send attack traffic.

Method 1: the free external checker

The fastest check needs no login. Enter your site above and the checker makes one ordinary request, reads the PHP version the server reports in its X-Powered-By and Server response headers, and tells you whether that release has the PHP2Shell fix. It never sends attack traffic.

You will get one of a few results:

An external checker is ideal for a quick triage across many sites, but it can only read what the server chooses to reveal. If the version is hidden, move on to a method that reads it from the inside.

Method 2: your hosting control panel

Your panel shows the version your host has assigned to each site, which is authoritative in a way an outside guess is not.

On a supported branch (8.2 to 8.5), the panel only chooses the branch; the host installs the actual patch release. So if your panel shows, say, PHP 8.2 but not the exact release, ask support whether the fixed build (8.2.35 or later) is in place. On your own server, run php -v for the command-line version and your package manager (dpkg -l 'php*' on Debian/Ubuntu, rpm -qa 'php*' on Red Hat) for the installed packages, including any distribution fix suffix.

Method 3: WordPress Site Health

If your site runs WordPress, Site Health reads the PHP version directly from the server, with no plugin required:

  1. Sign in to wp-admin.
  2. Go to Tools → Site Health, then the Info tab.
  3. Open the Server section and read the PHP version.

Compare that number with the fixed releases. Site Health also flags an outdated PHP version in its Status tab, though its warning is about general support, not PHP2Shell specifically, so check the number yourself. More detail per host: the PHP version WordPress runs on.

Why hidden versions are "can't tell"

Many servers remove or mask the X-Powered-By header, sit behind a proxy or CDN, or run a distribution package that carries the fix without changing its version number. In all of these cases an external check honestly cannot determine the result, and a responsible checker says so rather than guessing. A hidden version is not evidence of safety and not evidence of risk. When you see "can't tell," confirm from inside the server using Method 2 or 3, or a small monitoring agent that reports the real version. Our checker reflects this directly: it will never label a site vulnerable without a version string that proves it.

If the check says you're exposed

Don't panic, but don't wait. The fix is a PHP update, and PHP-FPM or Apache must restart afterward for the new code to take effect. Step-by-step instructions for each hosting type are in how to update your PHP version, and the full PHP2Shell background, including php.net's stopgap mitigations for sites that cannot update immediately, is on our PHP2Shell guide.

Want to know the day it matters? Continuous monitoring reads the real PHP version from inside your server every day and emails you the day a new fix applies to your site, plus the signs of a break-in. See pricing.

Questions

How do I check if my website is vulnerable to PHP2Shell?

Find the PHP version your site actually serves, then compare it with the fixed releases (8.5.12, 8.4.27, 8.3.36 and 8.2.35). Use a free external checker, your hosting panel, or WordPress Site Health. A version at or above the fix on its branch is patched; an older one, or PHP 8.1 or older, is exposed.

My site doesn't show its PHP version. Am I safe?

No, and you are not necessarily exposed either. A hidden version proves nothing either way. Confirm it from inside the server: your hosting panel, WordPress Site Health, or a small monitoring agent all read the real version that an outside request cannot see.

Does an external checker attack my site?

A responsible checker does not. Ours sends one ordinary page request, like a browser visit, and reads the version from the response headers and markup. It never sends exploit or attack traffic.

What if I run a Debian or Ubuntu package?

Distributions often add the fix while keeping the same version number, so the number alone can't tell you. Check your distribution's security tracker for the CVE, or confirm from inside the server.