Search web access logs, PHP error logs, and PHP-FPM logs for PHP2Shell exploitation signals since 17 October 2026 and respond to compromise.
Patching or applying temporary settings stops future attacks, but it does not tell you what happened before you applied the fix. To respond to PHP2Shell (CVE-2026-109618 and CVE-2026-109619) completely, you must check whether anyone tried to exploit your servers while they were exposed. In this lesson, you will examine your web server logs, PHP error logs, and FastCGI Process Manager (FPM) logs to spot signs of an attack and check your file systems for post-exploitation activity.
Previous lesson: PHP2Shell Mitigations When You Cannot Patch Yet | Next lesson: End-of-Life PHP: Backports or Upgrading to PHP 8.4
Before you open a terminal, you need a clear timeline. PHP released the security patches and public advisories on 21 October 2026. However, according to Amazon Threat Intelligence, attackers began testing exploitation against honeypots on 17 October 2026. This was four days before the public disclosure.
When you examine your logs for brightline-www (Ubuntu with Apache) and brightline-portal (Docker with nginx and PHP-FPM), you must search from 17 October 2026 onward. Do not start your search on the patch release date.
Common Mistake: Assuming that clean logs mean your server was never targeted or compromised.
Absence of evidence in your logs is not proof of safety. Log files rotate, containers get replaced without persistent logging, and an attacker who gains remote code execution (RCE) can edit or delete log files to hide their tracks. Treat log hunting as one layer of verification, not a guarantee.
Triggering CVE-2026-109618 (out-of-memory corruption) or CVE-2026-109619 (use-after-free) is noisy. Because public exploits are often unreliable and tied to exact memory layouts, attackers frequently crash PHP worker processes while trying to land a working attack.
According to security researchers at Wiz, you should hunt for four primary signals across your stack:
500 Internal Server Error or 502 Bad Gateway to the client.PHPSESSID cookies: CVE-2026-109619 involves the session upload progress feature. Abnormal session cookies on upload requests are worth a closer look.Hunting for these logs is like checking a building's circuit breakers after a storm. A tripped breaker does not tell you which appliance caused the surge, but it tells you exactly which room had an overload.
Your first stop is the PHP error log and the PHP-FPM master log. You are looking for two things: PHP exhausting its allowed memory size, and worker processes dying from operating system signals.
On Linux, signal 11 (SIGSEGV) means a segmentation fault occurred, which happens when a process tries to access memory it should not. Signal 6 (SIGABRT) means the process aborted itself, which often happens when the memory allocator detects corruption. A cluster of these crashes is a strong warning sign.
Run these read-only commands on brightline-www and the host or container for brightline-portal:
bashCopy
If your logs have already rotated into compressed archives covering 17 October 2026, use zgrep instead of grep:
bashCopy
For brightline-portal running in Docker, PHP-FPM typically writes to standard error (stderr). Check the container logs since 17 October:
bashCopy
Pro Tip: A single out-of-memory error on a heavy reporting page may be normal application behavior. A cluster of out-of-memory errors and signal 11 crashes within seconds of each other is a red flag.
If you find memory exhaustion errors or worker crashes at a specific timestamp, check your nginx or Apache access logs at that exact second. You want to see what HTTP requests arrived right before the crash.
Use awk to filter your access logs for POST requests that resulted in an HTTP 500 (Internal Server Error) or 502 (Bad Gateway, which nginx returns when an FPM worker crashes mid-request):
bashCopy
Look closely at the matching lines. Ask three questions:
POST data or file uploads, such as a static page or a read-only API route?POST requests in a short window?PHPSESSID value?Quick Challenge: Suppose you see 40 POST requests to /wp-login.php from one IP address in two minutes. The first 39 return HTTP 500, and the 40th returns HTTP 200. What does that pattern suggest? It suggests the attacker crashed the worker 39 times while tuning their attempt, and the 40th request may have succeeded without crashing PHP.
Finding failed crash attempts in your logs means someone knocked on the door. Now you must check whether anyone got inside. When an attacker achieves RCE on a PHP server, they typically drop a web shell (a small PHP script that accepts commands), modify existing application files, add a scheduled task, or open an outbound network connection.
Run these read-only checks on your servers to look for unexpected changes since 17 October 2026:
bashCopy
If session upload progress is turned off on your servers, as Lesson 4 recommends, your session files should not contain upload_progress entries. Check the session directory (often /var/lib/php/sessions on Debian and Ubuntu):
bashCopy
On brightline-www, if find shows a file named /var/www/html/wp-content/uploads/2026/10/cache-helper.php created on 19 October, treat the server as compromised. Upload directories should never contain executable PHP files.
If you discover a web shell, an unauthorized cron job, or suspicious outbound connections from a PHP worker, do not simply delete the suspicious file and move on. Once an attacker runs code as your web user, they can read anything that user can read and hide backdoors in places you might miss.
Follow these incident response steps in order:
/var/log, container logs, and command history) to a separate, secure storage location before shutting anything down..env files or environment variables.Practice running a safe log and filesystem audit on one of your staging or production Linux servers:
grep and zgrep commands against your PHP error logs and FPM logs to check for Allowed memory size errors and exited on signal (6|11) entries since 17 October 2026.awk command on your nginx or Apache access log to list POST requests that returned HTTP 500 or 502.find /var/www -name '*.php' -newermt '2026-10-17' -type f (adjusting /var/www to match your application path) and verify that every modified PHP file corresponds to a legitimate deployment you recognize.In the next lesson, End-of-Life PHP: Backports or Upgrading to PHP 8.4, you will handle legacy systems like brightline-invoicing on PHP 7.4 and plan a safe upgrade to a supported PHP branch.
Was this lesson helpful?