PHP2Shell: how CVE-2026-109618 and CVE-2026-109619 work, and attacks already observed
Analysis of CVE-2026-109618 and CVE-2026-109619: memory corruption, RCE, exposed configurations, observed attack traffic and PHP fixes.
Two PHP engine flaws with different exploitation conditions
Technical cut-off: 21 October 2026. Both PHP2Shell vulnerabilities are classified as critical, with a CVSS v4.0 score of 9.2. The PHP advisories describe them as potentially enabling unauthenticated remote code execution. Exploitability depends on the execution mode and reachable processing paths.
The release advisory covers PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. Checking only the command-line PHP binary is insufficient to characterise the HTTP service actually running.
I distinguish here between the documented mechanism, potential consequences and attack observations. A research proof of concept demonstrates possible exploitation in its context; it does not, on its own, prove that a production server was compromised.
CVE-2026-109618: an OOM interruption leaves incomplete data
According to GHSA-w8hw-w9fx-j79w, PHP can use longjmp() to abort a request during an out-of-memory condition, or OOM. If this exit happens during incomplete initialisation, request shutdown may subsequently use invalid internal data. Controlled memory layout can turn this defect into RCE.
The advisory describes paths involving multipart parsing and memory consumption in particular. An apparent limit on request size therefore does not guarantee that every allocation remains safe. With Apache mod_php, demonstrated exploitation can occur before application code executes.
PHP-FPM terminates its child process if request startup fails. This blocks that specific path, but the advisory considers FPM susceptible to other paths after initialisation; it does not present a complete demonstrated FPM exploit. Switching to FPM is therefore not a fix.
The fix replaces immediate OOM interruption with deferred handling at a safe point in the virtual machine, with immediate process termination beyond a second threshold. It aims to prevent cleanup from encountering incomplete data.
CVE-2026-109619: global state outlives a request’s memory
Advisory GHSA-6wmf-4rv5-p3rp describes a cross-request use-after-free. A worker process retains a global reference to memory belonging to a completed request. If the reference is not reset, a subsequent request in the same process can use it after the memory has been freed.
Exploitation requires a producer that leaves this stale state and a consumer that reads it before normal reset. A fatal error can interrupt the reset; some diagnostics during request shutdown can also recreate this state.
Confirmed consumers include configuration diagnostics before initialisation and session paths related to upload progress tracking. Hiding error messages does not prevent their internal execution. Exact versions and conditions vary according to the path described in the advisory.
Data theft, webshells, ransomware: what connections can be established?
Wiz, which participated in the research, documents possibilities for memory disclosure and code execution. A memory leak can expose information present in the process. RCE allows instructions to execute with the PHP process’s rights; impact then depends on its permissions and accessible resources.
Risk scenarios include reading application secrets, altering pages or installing a webshell backdoor. A cryptocurrency miner or ransomware could also be a later step if the acquired access permits it. These examples describe possible consequences without attributing a campaign to PHP2Shell.
Code execution in PHP does not automatically grant system administrator rights. Separating services and restricting permissions can limit impact. They do not fix the vulnerability.
Had attacks already occurred by 21 October 2026?
Yes: in its 21 October post, Cloudflare says it observed attack traffic targeting its customers and changes to submitted payloads attempting to bypass its protections. This is an observation of exploitation attempts reported by that operator.
CERT-EU also reports early proofs of concept circulating and considers that this increases the likelihood of ongoing exploitation. That risk assessment is not a list of confirmed victims.
The sources cited here do not establish a count of successful compromises or link these flaws to a specific group or ransomware. For a given incident, received requests must be correlated with server events and post-exploitation traces. A blocked WAF event proves neither successful compromise nor the absence of other access paths.
Patch the runtime and check every running process
The versions published by PHP to fix both flaws are 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Also check vendor bulletins: Ubuntu distributes backported fixes with its own package versions, including for PHP 8.1. A short version displayed by PHP alone is insufficient to reach a conclusion.
- Inventory PHP HTTP processes, their modules, images and packages actually deployed, then check the advisory corresponding to each vendor.
- Isolate exposed vulnerable services when immediate patching is impossible. Application filtering remains a supplementary measure.
- Install the fix on every instance and replace old processes. Then check the web service’s runtime and essential application flows.
- Preserve logs and examine anomalies: memory errors, process exits, unexpected files or accounts. These signs require investigation and are not specific to these two CVEs.
PHP states that configuration mitigations do not cover every path. Disabling session.upload_progress.enabled and restarting workers reduces some confirmed paths of the second flaw. It does not make the installation safe.
I advise against applying memory_limit=-1 on its own as an emergency recipe: removing that limit requires controlling memory consumption another way and does not cover every allocation failure. Refer to the updated PHP advisory for the full mitigations and their limitations, while prioritising the fix.
Sources and useful links
- PHP: advisory and releases of 21 October 2026
- PHP advisory CVE-2026-109618: RCE via OOM corruption, 21 October 2026
- PHP advisory CVE-2026-109619: RCE via stale global state, 21 October 2026
- Wiz Research: PHP2Shell analysis, 21 October 2026
- Cloudflare: observed attack attempts and protections, 21 October 2026
- CERT-EU: risk level and recommendations, 21 October 2026
- Ubuntu: full fixed package versions, USN-8948-1
- PHP vulnerabilities: understand and protect your website