On October 21, the PHP project shipped emergency fixes for two critical flaws in PHP itself, nicknamed PHP2Shell (CVE-2026-109618 and CVE-2026-109619). Both are rated 9.2 out of 10. Attack attempts started before many servers could be patched.
If your business website runs on WordPress or any other PHP software, this one applies to you, even if you have never heard of PHP.
What PHP2Shell is
Most website vulnerabilities live in a plugin or a theme. These live in the PHP runtime, the engine that runs the code. That changes everything:
- Your code doesn’t matter. Researchers showed that even a one-line “Hello World” page is exposed.
- No login needed. An attacker only has to reach a page served by PHP.
- It goes back years. Nearly every PHP version since 5.4 is affected.
- It can leak secrets without full control. One path lets an attacker read live server memory, which can hold database passwords, API keys and session tokens.
The risk is highest on servers using Apache’s mod_php, where a single request can trigger the attack before any website code runs. Servers using PHP-FPM, the more common modern setup, are also affected.
The flaws were found by Wiz Research, Calif and OpenAI’s Codex Security team, working with the PHP security team. The researchers say AI helped turn these long-standing bugs into working exploits far faster than a human team could have alone. That speed cuts both ways; more on that in our post on AI-speed attacks.
Who is exploiting it
Details leaked on October 20, a day before the planned release. Cloudflare reported attack attempts before the patches were even out, with attackers changing their payloads to slip past firewall rules. watchTowr observed exploitation attempts against both flaws within about 20 minutes of the official release. CISA issued an alert the same day urging organizations to patch immediately.
On October 23 PHP published a third, related advisory (CVE-2026-115560). It only affects an unusual session configuration and will be fixed in the next routine release. The same workaround below covers it.
How organizations are countering it
- Cloud and hosting providers are patching managed runtimes automatically. Google Cloud, for example, updated its supported serverless PHP runtimes and published firewall rules and new detections.
- Web application firewalls such as Cloudflare and Google Cloud Armor are blocking known attack patterns, including oversized request bodies used to trigger the memory flaw. These buy time; they are not a fix.
- Linux distributions are backporting the fixes into their own PHP packages.
- Security vendors have shipped detections, and Wiz is offering free patched PHP container images for 60 days.
What system administrators need to do
- Find every PHP install. Check each web server, container image and VM. Run
php -v, checkphp-fpm -v, and list installed packages (dpkg -l | grep phporrpm -qa | grep php). Don’t forget staging sites, old marketing sites and shared hosting accounts. - Patch. Fixed upstream versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Distribution packages may keep an older-looking version number, so check the package changelog for both CVE IDs rather than trusting the version string.
- Restart everything that runs PHP. Restart PHP-FPM, Apache and any long-running PHP workers or queue processes. Until they restart, the old vulnerable code is still in memory.
- If you can’t patch today, apply PHP’s interim mitigations. Set
session.upload_progress.enabled=0and restart. Keeppost_max_sizelow and enforce request-size limits at the web server or proxy (for nginx,client_max_body_size). PHP’s advisory also lists amemory_limitchange and, on PHP 8.5,fatal_error_backtraces=0. These block the known attack paths only. Patch as soon as you can. - Plan your way off PHP 8.1 and older. The PHP project is not releasing fixes for unsupported branches. Source backports exist for 7.4 through 8.1, but the real fix is upgrading.
- Put a WAF in front of public sites, as a compensating control while you patch and as a standing layer afterward.
- Hunt for signs of attack. Look for unusual multipart requests followed by memory-limit errors or bursts of HTTP 500 errors, oversized PHPSESSID cookies, and unexplained PHP worker restarts.
- Rotate secrets if you were exposed. If a public PHP server ran unpatched after October 20 and you see those signs, rotate database passwords, API keys and application secrets (for WordPress, the keys and salts in
wp-config.php). - Re-check limits after patching. The fix adds a hard memory limit that ends runaway processes, so review
memory_limitandpost_max_sizefor apps that handle large uploads.
If someone else hosts your website
Send your web host or developer one question, in writing: “Has our site’s PHP been updated for PHP2Shell (CVE-2026-109618 and CVE-2026-109619), and has PHP been restarted?” A good host will answer quickly with a version number. A vague answer is itself an answer.
The thing worth taking away
PHP2Shell is a preview of how vulnerabilities will play out from now on: a flaw in something everyone uses, a working exploit built with AI help, and attacks starting within minutes of disclosure. The response is the same every time. Know what you run, patch it, restart it, and verify it.
Sources
- PHP issues emergency patches for two critical PHP2Shell RCE flaws, The Hacker News
- PHP warns of another unpatched RCE risk two days after PHP2Shell patches, The Hacker News
- Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619, Google Cloud
- Critical vulnerabilities in PHP require immediate patching, CISA
- PHP2Shell FAQ, watchTowr