Critical PHP Flaws Found: How to Protect Your WordPress Site
If you run a WordPress website, your immediate security priority isn’t a theme update or a plugin patch—it’s the engine running beneath them.
The PHP Group released emergency security patches addressing two critical remote code execution (RCE) vulnerabilities—dubbed PHP2Shell (CVE-2026-109618 and CVE-2026-109619), rated 9.2 out of 10 on the CVSS scale.
Because these vulnerabilities exist in PHP itself, updating WordPress core or your plugins will not protect you. Here is what the flaw actually does, why it matters, and the exact steps to verify your site is safe.
What Is the “PHP2Shell” Flaw?
The vulnerabilities stem from improper memory management during out-of-memory fatal error handling in the PHP runtime.
-
The Threat: An unauthenticated remote attacker can craft malicious web requests designed to trigger specific memory conditions. When PHP handles the resulting error, memory pointers are corrupted, enabling the attacker to execute arbitrary shell code on the server without needing an admin password or site account.
-
Who Is Affected: Virtually any server serving web requests via PHP-FPM, Apache
mod_php, LiteSpeed, or CGI—meaning nearly all self-hosted WordPress installations are fundamentally exposed until patched. -
Active Exploits: CISA has added both CVEs to its Known Exploited Vulnerabilities catalog, and web firewalls like Cloudflare reported millions of exploit probes hitting servers within hours of disclosure.
Step 1: Check Your Site’s PHP Version
Because PHP is managed on your server rather than inside
wp-admin, start by checking what version your site is currently executing:-
Log into your WordPress dashboard.
-
Navigate to Tools > Site Health.
-
Click the Info tab and expand the Server section.
-
Locate the PHP version row.
The Safe Patched Versions:
-
PHP 8.5:
8.5.12or higher -
PHP 8.4:
8.4.27or higher -
PHP 8.3:
8.3.36or higher -
PHP 8.2:
8.2.35or higher
(Note: If your site is running End-of-Life branches like PHP 7.4, 8.0, or 8.1, the PHP team does not provide public pre-compiled releases. You should upgrade your site to PHP 8.2+ immediately).
Step 2: How to Apply the Patch
How you patch depends on your hosting setup:
If You Use Managed WordPress Hosting
Major managed platforms (such as SiteGround, WP Engine, Kinsta, Pressable, and Automattic) automatically backport and deploy server-level patches across their fleet. Check your host’s status page or open a quick support ticket to confirm that their PHP runtimes have received the security patch.
If You Run cPanel, Plesk, or CloudLinux
-
Log into your hosting control panel (e.g., cPanel).
-
Open Select PHP Version or MultiPHP Manager.
-
Select your domain and verify that the minor version matches the patched builds above (or upgrade to the latest stable PHP 8.3/8.4 release).
If You Manage a VPS or Dedicated Server
If you run an unmanaged Ubuntu, Debian, or RHEL instance, update your system packages via terminal:
Bash
sudo apt update && sudo apt --only-upgrade install php* -y
sudo systemctl restart php-fpm
sudo systemctl restart nginx # or apache2
Verify the output by running
php -v.Step 3: Temporary Mitigations (If You Can’t Patch Today)
If you are waiting on your host or testing legacy theme compatibility before bumping versions, apply these compensating defenses immediately:
-
Disable Upload Progress: Set
session.upload_progress.enabled = 0in your server’sphp.inifile and restart PHP. WordPress core does not rely on this legacy PHP feature, and turning it off blocks one of the primary attack vectors exploited by CVE-2026-109619. -
Turn On Edge WAF Rules: If your domain routes through Cloudflare, Wordfence, or Sucuri, verify that their managed Web Application Firewall (WAF) rulesets are active. WAFs inspect and filter out known PHP2Shell payload signatures before they hit your web server.
The Takeaway
WordPress site security is a full stack responsibility. While keeping plugins and themes updated is critical, vulnerabilities at the server runtime level bypass application-layer defenses entirely.
Take five minutes right now to check your Site Health > Server tab, confirm your PHP version with your web host, and lock down your server before automated botnets find it.

