PHP2Shell: Are You Affected? Here's How to Check and Fix It
Identify your PHP runtimes. Patch what’s exposed. Know what to investigate.
On October 21, PHP released emergency patches for two critical vulnerabilities that could allow an unauthenticated attacker to execute code on a web server.
The vulnerabilities, collectively called PHP2Shell (CVE-2026-109618 and CVE-2026-109619), affect PHP itself. That means WordPress, Laravel, Drupal, Joomla, and other PHP-powered applications may be exposed even if their application code is perfectly fine.
If your server is running an unpatched PHP runtime, treat it as potentially vulnerable.
Last checked: October 25, 2026.
1. Is my PHP version affected?
These are the first versions that fix both vulnerabilities:
| PHP version | First fixed release |
|---|---|
| 8.5 | 8.5.12 |
| 8.4 | 8.4.27 |
| 8.3 | 8.3.36 |
| 8.2 | 8.2.35 |
| 8.1 or older | No regular upstream support; upgrade or verify a vendor backport |
Check your installed version:
php -vThere's a catch: that command checks your command-line PHP installation, which isn't necessarily the version serving your website.
If you use PHP-FPM, Docker, Plesk, or managed hosting, check the actual web-serving runtime. For containers, inspect the running image. For managed hosting, check your control panel or ask your provider to confirm the PHP2Shell patch status, including security backports.
You can find the official fixes in the PHP release archive.
2. What applications are affected?
The issue isn't limited to one CMS or framework.
Potentially affected: WordPress, WooCommerce, Laravel, Symfony, Drupal, Joomla, custom PHP APIs, hosting control panels, and products that embed PHP in a management interface.
The server configuration changes how an exploit might work.
Apache with mod_php has the most serious demonstrated attack path, including code execution before application code runs. PHP-FPM, php-cgi, LiteSpeed, and FrankenPHP are also in scope, though exploitation conditions differ.
If you run PHP inside a third-party product, the vendor may need to supply the fix.
The Netherlands' National Cyber Security Centre maintains a useful PHP2Shell software and vendor advisory tracker. It covers potentially affected products beyond ordinary web applications and is worth checking as vendors publish updates.
3. What should I do right now?
Patch the runtime. Upgrade to a fixed release, rebuild affected containers where necessary, and restart PHP workers or web servers. Verify the patched version is actually serving requests.
If you can't patch immediately, consult PHP's temporary mitigation guidance. Disabling session.upload_progress.enabled, tightening request limits, and using WAF protections can reduce particular attack paths. None is a complete substitute for patching. CISA recommends taking vulnerable services offline when they cannot be secured.
Check for earlier attempts. Amazon observed PHP2Shell exploitation attempts as early as October 17, four days before disclosure. Review logs from at least that date for:
- Unusual multipart POST requests correlated with PHP errors
- Unexpected PHP-FPM or Apache worker crashes
- PHP workers launching shells or making unexpected outbound connections
Don't rely on a single suspicious IP or request string. Fastly found that some publicly circulated detections were actually matching other attacks.
For more detailed investigation, see Fastly's PHP2Shell traffic analysis and Amazon's early exploitation report.
4. What about WAF protection?
If you're using a managed WAF, check its PHP2Shell-specific protections while you roll out patches.
- AWS: PHP2Shell WAF mitigation guide — covers managed rules, version pinning, and configuration.
- Cloudflare: PHP2Shell WAF protections — explains the managed detections and why response-aware inspection matters.
Neither replaces an updated PHP runtime.
October 23 update: PHP also disclosed CVE-2026-115560, a separate issue involving an unusual session-serialization configuration. The October 21 patches do not address this specific issue. PHP recommends setting session.upload_progress.enabled=0 until its next regular bug-fix release. See the official PHP notice.
5. Why does PHP2Shell matter beyond PHP?
This is where the story gets interesting.
PHP developers had identified the underlying out-of-memory problem in 2024, but couldn't demonstrate a practical exploit. In 2026, researchers working with frontier AI models helped turn that problem into working remote code execution.
The PHP Foundation's account explains what happened, including why the issue was difficult to fix.
Meanwhile, many public PHP2Shell proof-of-concept scripts turned out to demonstrate crashes rather than reliable code execution. CrowdStrike documented that distinction in its October 23 analysis.
The AI contribution to vulnerability research is documented. The extent of AI involvement in real-world attack traffic is not.
That's an important difference.
At Murk, we're working on the same problem of separating a possible vulnerability from one you can actually reproduce and verify.
For PHP2Shell, however, the response is straightforward: identify your PHP runtimes, patch them, and investigate suspicious activity if they were exposed.
You don't need to wait for a working public exploit to take action.
Resources worth bookmarking
| Resource | Why it's useful |
|---|---|
| PHP official advisories | Patches, mitigations, follow-up notices |
| NCSC-NL PHP2Shell tracker | Vendor and third-party software status |
| Fastly's traffic analysis | Detection guidance and false positives |
| AWS WAF protection guide | Temporary protection for AWS deployments |
| PHP Foundation's incident account | How the vulnerabilities were discovered and fixed |
Part of Murk Field Notes: practical security research on AI, exploits, and the changing attack surface.
← Back to Field Notes