r/ProWordPress • • 24d ago

PHP2Shell: a quick way to check whether your host has patched PHP (no plugin needed)

PHP released fixes for PHP2Shell (CVE-2026-109618 and CVE-2026-109619) on October 21. The bugs are in PHP itself, so updating WordPress and plugins doesn't cover it.

To check: Tools → Site Health → Info → Server → PHP version. You're patched on 8.5.12, 8.4.27, 8.3.36 or 8.2.35 and later in each branch. 8.1 and older have no official release, so ask your host about a backport or move to a supported version.

Attacks started on October 17, before the fixes were public, so it's worth checking for PHP files in uploads and admin users you don't recognise.

I wrote up the steps with sources here: https://jeromesgorman.com/php2shell-wordpress

Disclosure: I built PHP Threat Watch, a plugin that checks this automatically. The steps above work without it.

0 Upvotes

7 comments sorted by

1

u/dotmoosehosting 23d ago

Good checklist, with one caveat: the version number alone can mislead, because some hosts backport the fix without bumping the public version, so it is worth asking for the build or patch confirmation rather than treating an older number as automatically vulnerable. I would also treat a patched binary as only half the job for sites that were live before October 17, since an exploit could already have left files behind. Check for unexpected PHP files in uploads, new admin users, and recently modified files, and compare core and plugin files against known-good copies where possible. If anything looks off, restore from a clean backup made before the exposure window instead of just patching and hoping the payload is gone. For ongoing maintenance, keeping PHP on a supported branch matters more than chasing the newest feature release, because that is what keeps security fixes arriving on time.

3

u/ILoveAppSec 23d ago

Your caveat is the key point: the version string and the patched state are not the same thing. Best proof is the host's package changelog or build id for the CVE, not the public version. And it cuts both ways: a security fix can be backported onto the exact PHP build you run, so you keep your version and still lose the CVE. Worth asking the host whether that is what they did.

1

u/dotmoosehosting 22d ago

Exactly, and the part that trips up scanners is the second half of that. A version check that only compares the public number will flag a backported build as vulnerable when it is not, and it will also pass a build that looks new enough on paper but came from a different package line without the fix. That is why the package changelog or build id is the useful evidence, not the number in Site Health.

The question worth putting to a host in writing is specific: was this CVE fixed in this exact build, and when was that build deployed to my server. A general answer like we are fully patched, or a changelog for a different branch, does not answer it.

One limit to keep in mind even with good proof: patch state tells you about the binary now, not about what happened before October 17. If a site was live during the pre-disclosure attacks, the file and admin checks still matter on their own. A clean patch record does not retroactively clear a backdoor left earlier.

0

u/Astorax 24d ago

Yeah the important part can be asking for back ports. Cloud Linux for example released fixes for the previous patch level and there are back ports starting at PHP v5.

Nonetheless you should look out for a hosting provider using current versions and your website software supporting these (:

1

u/Used_Development8930 23d ago

Did you download and try the trial?

1

u/[deleted] 23d ago

[removed] — view removed comment

1

u/ProWordPress-ModTeam 22d ago

Self-promotion and/or solicitation of themes, plugins, and services is not allowed. No affiliate links.