Detecting PHP2Shell
Updating PHP is the only complete fix. If a server can’t be updated right away, these are the signals to watch for until it is, and what each one means.
Updated
In web-request logs
01multipart/form-data to endpoints that take no upload
Every known trigger is a multipart/form-data request. Look into any POST with that content type to a URL that has no reason to accept a file, such as a login, an API route or the front page.
02Oversized or malformed PHPSESSID cookies
CVE-2026-109619 can be reached through PHP’s session upload-progress handling, which is on by default and works without a call to session_start(). Wiz describes a related bug that returns memory in the session cookie. Look for unusually long or non-standard PHPSESSID values.
03Bursts of HTTP 500s or memory errors
The attack drives PHP through an out-of-memory or fatal-error path. Clusters of 500s, out-of-memory log lines or repeated worker crashes from one client are a lead.
On the host
01A web-server process spawning a shell
CISA advises watching for PHP worker processes that launch shells or download tools. A php-fpm, php-cgi, httpd or apache2 process that spawns sh, bash, python, curl or wget is the clearest sign that the flaw was exploited.
02Workers restarting or crashing without cause
The flaw corrupts a worker’s state, so investigate unexplained PHP-FPM or application-server worker restarts, segfaults or OPcache resets.
A rough process-tree check for unexpected child processes of the web server:
ps -eo ppid,pid,comm,args | grep -E "php-fpm|php-cgi|httpd|apache2" \
| grep -E "sh|bash|python|curl|wget|nc "If you find something
Treat it as a full compromise. This flaw allows remote code execution, so after a confirmed hit the whole server should be considered breached. Isolate the host and preserve the web-server and PHP-FPM logs before they rotate. Amazon’s MadPot network logged the earliest known exploitation attempt on 17 October, so review logs back to at least that date. Rebuild from a known-good state instead of cleaning the server in place. Then update to a fixed PHP version before anything goes back online.
Sources
- PHP: official security advisoryThe fix announcement and version list
- CVE-2026-109618 · RCE via OOM corruptionGHSA-w8hw-w9fx-j79w
- CVE-2026-109619 · RCE via stale global stateGHSA-6wmf-4rv5-p3rp
- CERT-EU: Critical Vulnerabilities in PHPEU advisory 2026-018, 21 October 2026
- ENISA: joint statement on critical PHP vulnerabilitiesENISA, CERT-EU, DG CNECT, Europol EC3 and the CSIRTs network
- CISA: Critical Vulnerabilities in PHP Require Immediate PatchingUS government advisory, 21 October 2026