Skip to content
skopnix
← Cortex XDR detections

Cortex XDR · CVE exploitation

PHP web stack: PHP worker spawned a shell or download tool

Correlation
set the rule's MITRE tactic to TA0002 and technique to T1059.004
severity
medium
confidence
70/100
generated
14 Nov 2026

A PHP worker (php-fpm, php-cgi, LiteSpeed lsphp, or Apache running mod_php) started a shell, script interpreter or download tool. That is what a successful remote code execution does next on any SAPI, whatever the bug in PHP or in the PHP application turns out to be. Not specific to one bug: it fires on code execution through the PHP web stack by any route. Attached to the 11 CVEs in this stack that skopnix reported in the last 30 days, newest CVE-2026-119977, CVE-2026-116606, CVE-2026-114625.

False-positive notes

Needs a PHP worker or mod_php Apache as the PARENT and a shell / interpreter / downloader as the child. PHP mail() (sh -c sendmail / msmtp / exim / postdrop) and Apache piped logging (rotatelogs, cronolog) are excluded. The PHP command-line binary is not a parent on purpose (cron jobs and artisan / wp-cli run it all day and it is not reachable from the network). Legitimate exec() calls in an application still match: hunt for a week and baseline them before alerting.

References

dataset = xdr_data| filter event_type = ENUM.PROCESS and event_sub_type = ENUM.PROCESS_START| filter (lowercase(actor_process_image_name) ~= "^(php-fpm|php-cgi|lsphp)[0-9.]*(.exe)?$" or lowercase(actor_process_image_name) in ("frankenphp", "apache2", "httpd", "httpd.exe")) and (lowercase(action_process_image_name) in ("sh", "bash", "dash", "zsh", "ksh", "busybox", "curl", "wget", "nc", "ncat", "netcat", "socat", "perl", "ruby", "cmd.exe", "powershell.exe", "pwsh.exe", "certutil.exe", "bitsadmin.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "wscript.exe", "cscript.exe") or lowercase(action_process_image_name) ~= "^python[0-9.]*$") and not (lowercase(action_process_image_command_line) contains "sendmail" or lowercase(action_process_image_command_line) contains "msmtp" or lowercase(action_process_image_command_line) contains "exim" or lowercase(action_process_image_command_line) contains "postdrop" or lowercase(action_process_image_command_line) contains "rotatelogs" or lowercase(action_process_image_command_line) contains "cronolog")| fields _time, agent_hostname, actor_effective_username, action_process_image_name, action_process_image_command_line, actor_process_image_name, causality_actor_process_image_name| sort desc _time

skopnix-cortex-cve-stack-php-worker-shell-57e63dde.xql

How to deploy on Cortex XDR

Step 1
Paste the XQL into Incident Response > Investigation > Query Builder > XQL Search.
Step 2
To alert, save it as a Correlation Rule and set the MITRE tactic and technique printed with the rule.
Step 3
Schedule it on the interval you hunt at; keep the fields stage for the alert's columns.
Check
CVE rules read PAN-OS URL logs (panw_ngfw_url_raw), which need the NGFW integration and, for HTTPS, decryption.