Security Alert

PHP2Shell: Critical PHP RCE Vulnerabilities (CVE-2026-109618 and CVE-2026-109619)

Two critical PHP runtime flaws, what is fixed, and what to check. Status as of October 22, 2026.

The short answer. PHP2Shell is the name for two critical PHP runtime flaws, CVE-2026-109618 and CVE-2026-109619, that can allow unauthenticated remote code execution on servers that handle web requests. PHP released fixes on October 21, 2026. Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or a vendor backport), then check for signs of compromise. This story is moving fast, so the status below is as of October 22, 2026.

What is PHP2Shell?

PHP2Shell covers two memory-handling flaws in the PHP engine itself, not in WordPress, a plugin or any single application. Both are rated critical (CVSS v4.0 score 9.2). Because the flaw is in the runtime that processes web requests, anything running on a vulnerable PHP can be exposed, including WordPress, Drupal, Joomla and custom applications.

The impact is unauthenticated remote code execution with the privileges of the web worker. According to Huntress, which summarises Wiz's research, a separate memory-disclosure path could also expose passwords, tokens, API keys and certificates.

What happened, and when?

Date (2026) Event
October 17 Amazon's honeypot recorded a PHP2Shell exploitation attempt, four days before public disclosure
October 20 Details leaked before coordinated disclosure and before patches existed; researchers confirmed the flaws were real
October 21 PHP released fixed versions earlier than the original embargo; technical write-ups followed, and Wiz demonstrated unauthenticated RCE against WordPress, Drupal and Joomla
October 21 Huntress reported no in-the-wild exploitation on its partners' systems at 4:30 pm ET, while noting others reported attacks emerging
October 22 Cloudflare had deployed initial WAF rules; Palo Alto Networks said all PAN-OS and Panorama versions were affected with no fixed release yet; Searchlight Cyber released an open-source scanner

Treat the exploitation picture as unsettled. A working exploit exists, one pre-disclosure attempt was recorded, and reports of wider attacks were still developing. Check the sources below for updates.

Which PHP versions are affected and fixed?

PHP branch Fixed version
8.5 8.5.12
8.4 8.4.27
8.3 8.3.36
8.2 8.2.35

PHP 8.1 and earlier are no longer supported upstream and are affected. PHP provided minimal source backports for 7.4, 8.0 and 8.1 for teams that build from source or lack a long-term-support vendor. Linux distributions and LTS vendors received patches before publication, so check your vendor's package rather than judging by version number.

PHP says every installation that serves web requests is at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. mod_php is the most exposed: a demonstrated exploit lets a single unauthenticated request trigger the flaw before any application code runs.

Do not forget bundled PHP. Control panels, appliances, containers and vendor products often ship their own PHP. Your CMS version does not tell you which runtime serves the request.

What should you do now?

  1. Find every PHP runtime. Include containers, hosting panels, appliances and vendor software. Prioritize internet-facing systems.
  2. Patch. Move to a fixed version or confirmed vendor backport. Verify the running version afterwards, and restart workers so the new build is actually serving traffic.
  3. If you run end-of-life PHP, Huntress reports that setting session.upload_progress.enabled = Off in php.ini mitigates the known abuse cases (a restart may be needed). Treat it as a stopgap and plan an upgrade.
  4. If you cannot patch yet, reduce exposure: take the system off the internet or place it behind a VPN or WAF. The UK NCSC has urged organizations to consider taking offline any system that cannot be fixed immediately. A WAF is a speed bump here, not a fix.
  5. Hunt for compromise, including before the patch. Check the items below.
  6. Rotate secrets that the PHP process could read, if you suspect exposure.

How do you check for signs of compromise?

Huntress's detection guidance centres on one signal: a PHP worker (php-fpm, php-cgi, httpd, apache2) starting processes it normally never starts.

If you find any of these, isolate the server and preserve the web server and PHP logs before rebuilding. A patch closes the flaw. It does not remove a webshell that was planted earlier. For response planning, see our AI security incident response guide and the signs an application is compromised.

Why does this matter for AI applications?

Many AI products sit on ordinary web stacks: a WordPress site with a chatbot plugin, an admin dashboard, an API gateway or a vendor appliance. If the runtime underneath is taken over, no prompt-level control, guardrail or model hardening helps. The attacker is inside the server, with access to whatever the process can read, which often includes API keys for your model provider.

That is the same lesson as in agent security: protect the layer beneath the model, keep credentials narrowly scoped, and limit what a compromised process can reach. See AI agent credential security. HexTyx tests AI application behaviour, such as prompt injection and tool abuse. It does not scan your PHP version or patch level, so use your vulnerability scanner or hosting provider for that.

Frequently Asked Questions

What is PHP2Shell?
It is the name for two critical PHP runtime vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that can allow unauthenticated remote code execution on servers handling web requests. Both are rated CVSS v4.0 9.2.
Is PHP2Shell a WordPress vulnerability?
No. The flaws are in PHP itself. WordPress, Drupal, Joomla and custom applications can be affected because they run on PHP, so the fix is to update the PHP runtime.
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and earlier are unsupported upstream. Some distribution and long-term-support vendors provide backported fixes, so check your vendor.
Is PHP2Shell being exploited?
A working exploit exists and Amazon recorded an exploitation attempt on October 17, before public disclosure. Other sources were still reporting on wider exploitation as of October 22. Assume exploitation is possible and check for compromise.
Can a WAF protect me from PHP2Shell?
A WAF can block some known exploit patterns, and Cloudflare deployed initial rules. It does not replace patching, so update PHP.
Does patching remove an attacker who is already in?
No. Patching stops exploitation through these two flaws. It does not remove webshells, new accounts, scheduled tasks or stolen credentials. Investigate, rotate secrets and rebuild where needed.
What if my hosting provider manages PHP?
Ask them to confirm the exact fixed build or vendor backport running in production, and whether workers were restarted. If you suspect compromise, ask for an investigation too.

Sources

Is your AI a chatbot or an agent?

Run the free playground scanner against your AI application and see what an attacker could make it do.

Related Guides

Incident Response
AI Security Incident Response
Detection
Signs an AI Application Is Compromised
Best Practices
AI Agent Credential Security
All Topics
AI Security Topic Hub
All Topics
AI Security Topic Hub →