Explainer

How PHP2Shell checks work, and which result to trust

Short answer

There are three ways to check for PHP2Shell: read the version a website advertises, inspect the PHP installed on the server, or send an active probe. Header checks miss hidden versions and backported fixes; probes can be blocked by a WAF or strain an unpatched server. The server-side check is the one to trust.

On this page

The three methods

Method What it looks at What you need Where it goes wrong
Version from headers (remote) The X-Powered-By or Server header your site sends Just the URL Most production servers hide the version. Distro packages look vulnerable even when patched. Proxies and CDNs can strip or rewrite headers.
Server-side check The PHP binary that serves the site, its package version and changelog, or its build date Shell, hosting panel or WordPress admin Checking the command-line PHP instead of PHP-FPM, or forgetting to restart after upgrading
Active probe (remote) How the server reacts to requests designed to trigger the bug Just the URL, plus permission to test A WAF can block the probe, giving a false “clean”. On an unpatched server a probe can crash workers.

Why results disagree

  • “The scanner says vulnerable, but my host says it’s patched.” Usually a backport. Ubuntu 24.04’s fixed package still reports PHP 8.3.6, and Plesk’s patched 8.1 builds still report 8.1.34. A version check can’t see the fix; the package changelog or build date can. How to check
  • “The scanner says clean, but I know I’m on 8.3.30.” The server hides its version, or a WAF blocked the probe. A clean result from outside proves very little.
  • “php -v says 8.3.36, but the site still shows the old version.” The command line and the web server use different PHP binaries, or PHP-FPM wasn’t restarted. Which PHP is serving your site?
  • “Everything says patched, and there’s still a warning about upload progress.” That’s probably CVE-2026-115560, a separate session flaw fixed on 19 November in 8.5.13, 8.4.28, 8.3.37 and 8.2.36. A server patched only for PHP2Shell needs that newer release, or the php.ini setting until it’s installed.

Which check should I use?

  • Site owner on shared hosting: read the version and build date from WordPress Site Health or your control panel, then paste it into the checker. If anything is unclear, ask your host.

  • Server admin: check the binary that serves traffic, not the CLI:

    npx php2shell-checker@latest --local --php /usr/sbin/php-fpm8.3

    On distribution packages, confirm with the changelog — it’s the authority for backports.

  • Containers and CI: run the check against the image in your pipeline so an unpatched base image fails the build. CLI and CI setup

  • Many servers: use your vulnerability scanner’s authenticated (credentialed) scan. It reads installed packages instead of guessing from headers.

A word on active probes

Only probe systems you own or have written permission to test. Testing someone else’s server can be illegal, even with good intentions. An unpatched server can also crash or misbehave under a probe — on production, prefer the server-side check.

What our checker does, and doesn’t do

  • The checker on our home page compares the version you type with the fixed releases. It runs in your browser; the version is never sent anywhere.
  • The CLI either reads the version your site advertises (npx php2shell-checker@latest https://your-site.com) or runs the PHP binary on your server (--local). It is read-only and never sends attack traffic.
  • Backports. The in-browser checker only sees the number you type, so it can’t see a backported fix. The CLI’s --local mode reads the changelog of the package that owns the PHP binary on Ubuntu, Debian and RHEL-family systems, and counts the CVE IDs it finds. For panel builds, the build date or vendor notes are still the authority.

Shayan Abbas writes these PHP security guides from the official advisories and vendor guidance listed below, and updates them when those change. About this site

Sources

  1. php.net — PHP2Shell security release (21 Oct 2026)
  2. php2shell-checker on GitHub

Know about the next critical PHP bug first

Short, plain-English alerts when a serious PHP vulnerability or fix lands — with what to patch and how. About two emails a month.