PHP2Shell Explained: What the Critical PHP Vulnerabilities Mean for Your WordPress Site
PHP2Shell (CVE-2026-109618 and CVE-2026-109619) lets attackers run code on unpatched PHP servers. What happened, how to check your PHP version, and how to protect WordPress and WooCommerce sites.

Short answer: PHP2Shell is the name for two critical flaws in PHP itself (CVE-2026-109618 and CVE-2026-109619) that can let an attacker run code on your server without logging in. They affect PHP 5.4 through 8.5, so almost every WordPress site was exposed. The fix is to run PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or newer, or a host-provided patched build. Check your PHP version today.
What happened?
In October 2026, the PHP project patched two memory-safety bugs in the PHP engine. Both are rated 9.2 out of 10 (CVSS 4.0) and allow remote code execution: an attacker can make a vulnerable server run their own code, without an account or password.
Because the bugs are in PHP itself, not in WordPress or a plugin, they affect any PHP application: WordPress, WooCommerce, Drupal, Joomla, and hosting tools like cPanel and Plesk. PHP runs roughly 7 out of 10 websites whose server language is known, which is why this was one of the biggest web security events of the year.
Timeline
- August 2026: researchers find the bugs. One was found by Ryan Austin of the security firm Calif during OpenAI’s “Patch the Planet” project, using an AI model. Wiz independently found the related issues and named them “PHP2Shell”.
- 17 October: Amazon’s threat intelligence team saw an exploitation attempt, four days before the patches were public.
- 20 October: details leaked early, and PHP announced the security release.
- 21 October: patched PHP versions and advisories were released. Within hours, security firms reported attacks in the wild.
- Late October: governments and large organisations took unpatched sites offline as a precaution, and agencies including CISA and the NSA urged immediate updates. Security researchers reported attackers chaining PHP2Shell with a Linux privilege-escalation bug to take full control of some servers.
One uncomfortable detail: PHP’s own post-mortem reportedly showed that one of the bugs was spotted in a 2024 code audit, but wasn’t fixed because nobody had shown a practical exploit. AI tools have changed that. Bugs that were “too hard to exploit” are now being found and exploited much faster.
Is my WordPress site affected?
If your site runs any PHP version older than the patched releases, assume it’s vulnerable. Affected versions:
| PHP branch | Patched version | Status |
|---|---|---|
| 8.5 | 8.5.12 or newer | Supported |
| 8.4 | 8.4.27 or newer | Supported |
| 8.3 | 8.3.36 or newer | Supported |
| 8.2 | 8.2.35 or newer | Security fixes only |
| 8.1, 8.0, 7.4 | No official release | End of life: upgrade, or use a host backport |
| 5.4 to 7.3 | None | End of life: upgrade now |
Many hosts quietly patched their servers. cPanel and CloudLinux released backported fixes for older branches, so an old version number doesn’t always mean you’re exposed. If you’re not sure, ask your host directly.
How to check your PHP version
- In WordPress: go to Tools → Site Health → Info → Server and look at “PHP version”.
- In cPanel: open MultiPHP Manager or Select PHP Version to see and change the version per domain.
- On a VPS: run
php -v, and also check the version your web server actually uses (PHP-FPM can differ from the command-line PHP).
What to do right now
- Update PHP to a patched version, or confirm with your host that their build includes the fix. PHP’s maintainers said temporary workarounds were incomplete, so updating is the only real fix.
- Test on staging first if you’re jumping versions. Moving from PHP 7.4 to 8.3 can break old themes and plugins. If you can’t test quickly, put the site in maintenance mode rather than leaving it unpatched.
- Update WordPress, themes and plugins at the same time. Old plugins are often the reason sites are stuck on old PHP.
- Turn on a web application firewall. Cloudflare and other providers shipped temporary rules for PHP2Shell. A WAF helps, but it doesn’t replace patching.
- Check for signs of compromise if your site was unpatched after 21 October (see below).
Signs your site may have been hacked
- New admin users you didn’t create.
- Unknown PHP files in
wp-content/uploads, or recently changed core files. - Spam pages, strange redirects, or Google showing “This site may be hacked”.
- Unexpected cron jobs, high CPU usage, or your host reporting outgoing spam or attacks.
- WooCommerce checkout pages with extra scripts you didn’t add (card skimmers).
If you find any of these, take a full backup for evidence, then restore from a clean backup taken before the attack, update everything, and change all passwords and API keys, including database, hosting, FTP and payment gateway keys. Updating PHP closes the hole, but it doesn’t remove anything an attacker already left behind.
Lessons for site owners
- Your hosting stack is part of your security. A fully updated WordPress install on an old PHP version is still vulnerable.
- Old PHP is a real cost. Sites stuck on PHP 7.4 for “compatibility” had no official patch. Budget for keeping themes and plugins compatible with supported PHP.
- AI is speeding up both sides. The same tools that found these bugs can help attackers find the next ones. Expect shorter gaps between disclosure and attack, and patch faster.
- Have a plan before you need it: automatic backups stored off-server, a staging site, uptime and file-change monitoring, and someone who can act the same day.
Not sure if your WordPress or WooCommerce site is patched, or stuck on an old PHP version because of a theme or plugin? I can check your setup, upgrade PHP safely on staging and fix whatever breaks. Get in touch.
Sources: PHP security advisories, Palo Alto Networks Unit 42, SecurityWeek and other public reporting as of November 2026. Details may change as investigations continue.



