PHP2Shell is two critical flaws in the PHP engine, CVE-2026-109618 and CVE-2026-109619, that allow remote code execution without a login on PHP web servers. PHP fixed them on October 21, 2026 in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Patch and restart every PHP worker now. Because exploitation attempts were seen before the patch existed, an internet-facing PHP server that was unpatched also needs an investigation, which counts as incident response under SOC 2 and ISO 27001 even when no personal data is involved.
Last updated: October 24, 2026
At a glance
The timeline below shows how PHP2Shell unfolded, from the first attack attempt on October 17, 2026 to the planned disclosure date.
Exploitation attempts came four days before disclosure, so patching alone does not answer whether you were hit. Click to enlarge.
Both PHP2Shell flaws are memory-safety bugs in PHP's own runtime, so they affect any PHP application that handles web requests, whatever framework or CMS it uses. The bugs trigger while PHP is still setting up the request, before WordPress, Drupal, Laravel or custom code runs. Application logins, plugins and input validation cannot stop them.
| PHP2Shell CVE | What goes wrong | How an attacker triggers it |
| CVE-2026-109618 | When PHP runs out of memory partway through building request data, the end-of-request cleanup treats the half-built data as valid and can run attacker-influenced code | Oversized or malformed multipart form posts that exhaust memory within normal limits |
| CVE-2026-109619 | State left over from one request (sessions, errors, objects) is reused by the next request on the same worker after its memory was freed | Session upload progress (on by default), fatal-error backtraces in PHP 8.5, and some configuration warnings |
PHP rates both 9.2 on CVSS v4.0 and marks the attack complexity as high, because exploitation depends on worker reuse, memory conditions and defeating address randomization. Failed attempts tend to crash workers, which leaves traces in the logs. The Datadog Security Labs analysis walks through both bugs in technical detail.
The diagram below shows where in a web request PHP2Shell triggers, and why the attack completes before application-level controls start.
Both flaws fire while PHP sets up the request, so a site needs no upload form or login to be exposed. Click to enlarge.
The diagram below breaks down each bug step by step, based on the PHP advisories and the Datadog Security Labs analysis.
The two PHP2Shell bugs step by step, from the PHP advisories and the Datadog Security Labs analysis. Click to enlarge.
PHP2Shell affects every supported PHP branch below the October 21, 2026 releases, and every end-of-life branch.
| PHP branch | Fixed version | Status |
| 8.5 | 8.5.12 | Supported, patch available |
| 8.4 | 8.4.27 | Supported, patch available |
| 8.3 | 8.3.36 | Supported, patch available |
| 8.2 | 8.2.35 | Supported, patch available |
| 8.1, 8.0, 7.4 | None from PHP | End of life. Source backports only, so the fix depends on the OS vendor or host |
| 7.3 and older | None | End of life. Plan the upgrade |
Linux distributions patch their own PHP packages and usually keep the old version number, so a distribution's PHP 8.3 or 8.2 package can be patched while still reporting an older version. Red Hat, Debian, AlmaLinux and cPanel had published updates on October 21. Check the vendor's advisory for the exact package build.
We update the PHP2Shell tracker as PHP and the Linux distributions ship new builds, so check it for the current list of fixed versions and vendor advisories.
Start a PHP2Shell exposure check with the PHP that serves web traffic, because the command-line PHP is often a different build. The free PHP2Shell checker gives a first signal from outside by reading the PHP version a site advertises. Confirm on the server with phpinfo() from a protected page and the package changelog for both CVE IDs, because Linux distributions patch without changing the version number. On managed hosting, ask the host in writing and keep the reply.
The how to check for PHP2Shell post has the commands for each hosting setup, container images and a list of domains.
PHP2Shell needs vulnerability remediation first and then, because exploitation began before the patch, an incident response check that follows the NIST SP 800-61 phases: detection and analysis, containment, eradication and recovery, and post-incident activity. Evidence preservation comes before everything else, because patching and redeploying can wipe the logs the analysis needs. The first three steps can be finished today.
Step 1. Evidence preservation
Step 2. Remediation
session.upload_progress.enabled=0, set fatal_error_backtraces=0 on PHP 8.5, cap request and multipart sizes at the web server or proxy, and turn on WAF rules from Cloudflare or another provider. PHP's advisory calls patching the only complete fix.Step 3. Detection and analysis
Step 4. Containment, eradication and recovery (when a server was compromised)
Step 5. Post-incident activity
No confirmed indicators of compromise (file hashes, IP addresses, domains) had been published by October 22, 2026. Researchers, including Datadog Security Labs and the NCSC-NL and CERT-EU repository, point to behavior instead.
| Sign in logs or on the host | What it suggests |
A web worker (apache2, php-fpm, httpd, php-cgi) starting sh, bash, curl, wget or connecting out |
Strongest signal of code execution. Investigate immediately |
Allowed memory size ... exhausted ... in Unknown on line 0 in the PHP error log |
Memory ran out before any script ran. Consistent with CVE-2026-109618 attempts, though not proof on its own |
Apache AH00052 ... Segmentation fault or bursts of worker crashes and HTTP 500s from one client |
Failed exploitation attempts |
Multipart POSTs to pages that take no uploads, or requests carrying a PHP_SESSION_UPLOAD_PROGRESS field |
Probing of CVE-2026-109619 |
| Very large field names or binary data in form posts | Attempts to exhaust memory |
A successful exploit can return HTTP 200 and leave the worker running, so a clean-looking access log alone does not settle the question.
PHP2Shell triggers before any application code runs, so logins, input validation and plugin updates play no part in stopping it. Once a worker is taken over, the design around PHP decides how far the attacker gets.
| Design choice | Effect on a PHP2Shell compromise |
| Egress filtering. The web tier can reach only the services it needs, with no general outbound internet access | The attacker's usual next steps, a reverse shell or a payload download, fail |
| Least-privilege web workers. The PHP worker account can read only the secrets and files the application needs | Code running as the worker has little to steal |
| Segmentation. The web tier reaches data stores only on the ports and accounts the application uses | A compromised web server cannot browse the database or reach internal systems |
| Immutable rebuilds. Servers and containers are only ever replaced from versioned images | Recovery is a redeploy of a clean, patched image, and any change on a running server stands out |
The same choices decide the breach question. A compromised web server that could reach no personal data is a security incident to clean up, while one holding database credentials with broad read access is a likely breach.
Treat PHP2Shell as a vulnerability to patch and, for any internet-facing PHP server that was unpatched after October 17, 2026, as a security event that needs an investigation. Running the incident response process to answer were we exploited? is the expected control, and it does not by itself mean a breach occurred.
The same facts lead to different answers under different rules:
| Outcome of the PHP2Shell investigation | Security program (SOC 2, ISO 27001) | Privacy law (GDPR, HIPAA, PIPEDA, Law 25) |
| Patched, no sign of exploitation | Vulnerability closed, investigation documented as a security event | Nothing to notify |
| Server compromised, no personal data on it or reachable from it (for example, a marketing site turned into a crypto-miner or used to pivot) | Security incident: contain, eradicate, recover, document | Usually no breach, because no personal data was compromised |
| Server compromised, and it held or could reach personal data or PHI | Security incident | Possible breach. Run each law's test and its clock |
| Exploitation cannot be ruled out because logs are missing | Security incident, with a documented gap in logging | Assess as a possible breach on a worst-case basis where personal data was reachable |
The second row is the one teams tend to miss. A compromised web server is a security incident for the company, with recovery work and evidence to keep, even if no regulator ever needs to hear about it.
Key insight
A compromised PHP server is a security incident even with no personal data on it.
SOC 2 and ISO 27001 expect containment, recovery and a documented record whenever a server is taken over. Privacy laws add notification only when personal data or PHI was compromised.
SOC 2 and ISO 27001 expect a documented vulnerability response and, where exploitation is possible, a documented decision on whether an incident occurred. Neither framework sets a notification deadline.
| Framework | Controls in play | Evidence an auditor will expect |
| SOC 2 | CC7.1 (detect new vulnerabilities), CC7.2 and CC7.3 (monitor and evaluate events), CC7.4 and CC7.5 (respond and recover), CC9.2 (hosting and vendor patching) | The PHP inventory, the patch ticket and its timing against policy, the event assessment, and any incident record |
| ISO 27001:2022 | A.8.8 (management of technical vulnerabilities), A.8.9 (configuration management), A.5.25 (assessment and decision on information security events), A.5.24-A.5.28 (incident management) | The same, plus lessons learned feeding the risk register |
An end-of-life PHP version with no fix is a risk to record and treat: upgrade, isolate, or formally accept the risk with an owner and a date. The SOC 2 CC7.1 vulnerability management guide, the ISO 27001 A.8.8 guide and the SOC 2 vulnerability risk acceptance guide cover each step.
GDPR and HIPAA apply only if the investigation finds, or cannot rule out, that personal data or protected health information was compromised. An unexploited vulnerability is not a breach under either law, although GDPR Article 32 and the HIPAA Security Rule both expect timely patching as part of keeping systems secure.
| Law | When PHP2Shell becomes a breach | Clock |
| GDPR | A compromised server led to access to personal data, judged with a reasonable degree of certainty (EDPB Guidelines 9/2022) | 72 hours to the supervisory authority from that point, unless unlikely to result in risk. Individuals without undue delay if high risk. Document every breach (Art. 33(5)) |
| HIPAA | PHI was accessed or disclosed without permission, presumed a breach unless a four-factor risk assessment shows low probability of compromise (45 CFR 164.402) | Individuals within 60 days of discovery. HHS and media when 500 or more people are affected |
| PIPEDA (Canada) | A breach of security safeguards creates a real risk of significant harm | As soon as feasible. Keep a record of every breach for 24 months |
| Quebec Law 25 | A confidentiality incident presents a risk of serious injury | Promptly, to the Commission d'accès à l'information and affected people. Register every incident |
HIPAA is broader at the incident stage. Under 45 CFR 164.304, even an attempted unauthorized access is a security incident that the Security Rule expects covered entities and business associates to identify, respond to and document.
Truvo scopes exposure, reviews logs and documents the decision as part of an effective security program.
Exploitation attempts are confirmed. Amazon's honeypots logged an attempt on October 17, 2026, and Cloudflare and watchTowr reported attack traffic on October 21. CISA had not listed either CVE in its Known Exploited Vulnerabilities catalog, and no compromised organization had been named, as of October 22, 2026.
A WAF reduces risk while patching is under way. Cloudflare enabled rules for all plans on October 21, 2026, and other vendors claim coverage, but Cloudflare has seen attackers change payloads to slip past rules. PHP states that patching is the only complete fix.
Yes. PHP2Shell is in PHP itself, so any WordPress, Drupal, Magento or Laravel site running an unpatched PHP is exposed regardless of plugins or application updates. On managed WordPress hosting, the host patches PHP, so ask the host to confirm in writing.
Yes. PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 fix both CVEs. Restart every PHP worker after upgrading, and rebuild container images, because running workers keep the old code in memory.
An unpatched vulnerability alone is not a breach under GDPR, HIPAA or PIPEDA. It becomes one only if exploitation led to personal data or PHI being compromised, which the log investigation decides. It is still a security event to assess and document for SOC 2 and ISO 27001.
PHP 8.1 and older receive no official release. Upgrade to 8.2 or newer, or confirm that the OS vendor or host has shipped a patched package, and isolate the server from the internet until one of those is done.
PHP2Shell rewards the teams that know where PHP runs, which version each site uses, and who patches it. From a security architecture view, PHP2Shell also tests the design around the runtime: egress, privileges and segmentation decide how far one compromised worker gets. The patch takes minutes. Finding every PHP server, preserving the logs and making a documented call on were we exploited? is where the work is.
If your team needs help scoping the exposure, reviewing logs or making the incident and breach determination, Truvo's incident response team can run it with you and leave you with the evidence your auditor and customers will ask for. The PHP2Shell incident tracker stays updated as vendors publish.
PHP is not the only runtime with a critical flaw this month. CVE-2026-111497 in the Brotli decoder, also called Node2Shell and HTTP2Shell, affects Node.js, .NET, Bun, Python packages and Envoy. Check your versions with the free Brotli vulnerability checker, which includes a read-only self-check script for your servers.