What is PHP2Shell Emergency Checklist?
The PHP2Shell emergency checklist is a 72-hour response plan for CVE-2026-109618 and CVE-2026-109619 covering inventory, patching, interim mitigations, compromise detection, secret rotation and reporting. It exists because exploitation was reported before the official patch shipped on 21 October 2026.
This checklist is for IT leads, DevOps engineers, agency owners and CTOs responsible for PHP or WordPress systems, and it turns the guidance from PHP, Wiz, Recorded Future and SOCRadar into a practical 72-hour plan. The one-line version: upgrade to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, restart every PHP worker, rotate secrets, and hunt for signs of compromise from before you patched. Exploitation was reported before the patch shipped, so patching closes the door but you still need to check whether anyone came in first. Hours 0 to 4 cover triage and inventory, hours 4 to 24 patch or isolate, hours 24 to 48 detection, and hours 48 to 72 secret rotation, hardening and reporting.
Hour 0-4: triage and inventory
The goal of the first four hours is to know every place PHP runs and who owns it, and the response runs in three phases across 72 hours: stabilise, investigate, recover. Open an incident ticket and name an incident lead, because even small teams benefit from one owner. List every PHP workload, including the ones people forget: public websites running WordPress, Drupal, Joomla or Magento; custom apps on Laravel, Symfony, CodeIgniter, CakePHP or in-house frameworks; internal tools such as phpMyAdmin, ticketing systems, intranets and Nextcloud; containers and images built on php base images; third-party appliances and SaaS that embed PHP; and staging, dev and temporary servers that were never switched off. Record the PHP version and SAPI for each one, whether mod_php, PHP-FPM, php-cgi, FrankenPHP or LiteSpeed, and rank them by exposure with internet-facing systems that handle logins or payments first. Confirm ownership of managed hosting and email providers for a written patch status.
php -v
ls /usr/sbin/php-fpm* 2>/dev/null; php-fpm -v 2>/dev/null
dpkg -l | grep -E '^ii\s+php[0-9.]*-(fpm|cli|common)'
rpm -qa | grep -E '^php(-fpm|-cli|-common)?-'
docker ps --format '{{.Image}}' | sort -uPro Tip
Do not rely on the X-Powered-By header to identify the PHP version. Many servers hide or fake it, so check the server itself.
Hour 4-24: patch or isolate
The goal is that every internet-facing PHP runtime is on a fixed build, or is no longer reachable from the internet. Take a snapshot or backup first, then upgrade PHP packages through your OS package manager, control panel or vendor. Restarting all PHP workers is critical, because CVE-2026-109619 abuses state that persists across requests on the same worker, so restart every PHP-FPM pool and, if you use mod_php, the web server as well. Rebuild and redeploy containers from a patched base image rather than patching running containers in place. Verify from the web layer with a temporary authenticated phpinfo page or Site Health in WordPress, delete any phpinfo file afterwards, and smoke test checkout, login, forms and admin. If a system cannot be patched today, isolate it behind a VPN or IP allowlist or take it offline, which is what governments in France, Denmark, Finland and the Netherlands did, and put a maintenance page served from a CDN in its place.
sudo systemctl restart php8.3-fpm # adjust version
sudo systemctl restart apache2 # if mod_phpInterim mitigations if you cannot patch
PHP and security researchers published hardening measures that reduce exposure but do not make a system safe, and SOCRadar says to treat them as temporary. Disabling session upload progress with session.upload_progress.enabled=0 and restarting workers removes a default-on code path used in CVE-2026-109618. Lowering post_max_size to 8M without uploads or 32M with uploads makes it harder to force memory exhaustion, while setting memory_limit so applications cannot override it, paired with container or cgroup memory limits, avoids triggering the out-of-memory fatal error path inside PHP. Avoid process rlimits such as RLIMIT_AS and RLIMIT_DATA, because they can trigger the same fatal path. On PHP 8.5, fatal_error_backtraces=0 disables a code path involved in CVE-2026-109619. Enforce request body size and multipart part counts at Nginx or the load balancer, deploy WAF rules such as those Cloudflare shipped, and lock the origin so only CDN or WAF IPs can reach it.
client_max_body_size 32m;
client_body_buffer_size 128k;
# Consider rate-limiting POSTs to PHP endpoints
limit_req_zone $binary_remote_addr zone=phppost:10m rate=10r/s;Warning
memory_limit=-1 with no container or OS limit can let a single request exhaust the host. Always pair it with a cgroup limit.
Hour 24-48: detect and investigate
The goal is to decide, with evidence, whether anyone exploited you before the patch. Recorded Future advises reviewing activity from 20 October 2026 onward and looking further back if you can, because exploitation started before the patch. Exploitation happens below the application layer, so application logs may show very little; focus on web server logs, PHP error logs and process telemetry. Look for unusual multipart POSTs followed by memory-limit errors, often in bursts, repeated HTTP 500 responses from the same IP addresses, oversized or malformed PHPSESSID cookies, PHP processes spawning children such as php-fpm, php-cgi, httpd or apache2 launching sh, bash, python, perl, curl or wget, new files in web roots especially PHP files in upload directories, new cron jobs, users or SSH keys, and outbound connections from web servers to unfamiliar IP addresses.
If you use an EDR such as SentinelOne, CrowdStrike or Defender, alert on web-server processes spawning shells, because SentinelOne published PHP2Shell-specific guidance. If you find something, isolate the server from the network without wiping it, preserve logs, memory and a disk image, hunt for web shells, persistence and lateral movement, and rebuild from known-good sources rather than trying to clean a compromised server. Recorded Future noted about 394,000 PHP hosts also exposed SSH and 233,000 exposed MySQL, which shows how far lateral movement can travel. Engage an incident response provider and consider your legal notification duties.
grep -Ei "Allowed memory size of .* exhausted" /var/log/php*/*.log /var/log/nginx/error.log /var/log/apache2/error.log
grep -E "PHPSESSID=[^;]{128,}" /var/log/nginx/access.log
find /var/www -name "*.php" -mtime -5 -printf "%TY-%Tm-%Td %TH:%TM %p\n" | sort
find /var/www -path "*uploads*" -name "*.php"
ls -la /etc/cron.* /var/spool/cron/crontabs 2>/dev/nullHour 48-72: rotate, harden and report
The working assumption is that secrets in PHP memory may be exposed, because memory disclosure can leak passwords, authentication tokens, API keys and certificates from other requests. Rotate database passwords; framework secrets such as the Laravel APP_KEY with care, Symfony APP_SECRET and WordPress salts; payment gateway keys from Stripe, PayPal or Adyen and their webhook secrets; SMTP, CRM, ERP and cloud provider credentials stored in .env or config files; OAuth client secrets and JWT signing keys; and TLS private keys if they were readable by PHP workers. Then harden the estate: remove unused PHP extensions and disable dangerous functions such as exec, shell_exec, system, passthru and proc_open, run PHP-FPM pools as separate low-privilege users per site, make application code read-only to the web user, lock origins so they accept traffic only from your CDN or WAF, and turn on automatic security updates for OS packages where you can. Close the loop with a short post-incident summary covering systems, versions, patch times, findings and rotated secrets, brief leadership in business terms about the exposure window, data at risk and residual risk, and file regulatory notifications if a breach occurred.
Note
GDPR Article 33 requires notifying the supervisory authority within 72 hours of becoming aware of a personal data breach, so keep the post-incident report ready.
After 72 hours: the strategic decision
Once the fire is out, look at what the incident cost you in engineering hours, lost revenue, downtime and stress, then ask four questions. How many of your systems were on end-of-life PHP with no official fix? How long did it take to find every PHP workload? How confident were you that patching would not break production? Would you cope with another one next quarter? If the answers are uncomfortable, patching alone will not change the outcome next time. Beyond the Patch sets out a retire, upgrade, re-platform or rebuild framework for that decision, and The Real Cost of Staying on PHP gives a structured cost model, so each system can be graded and scheduled rather than debated again during the next emergency. App Corp runs this assessment as a fixed-fee engagement and can execute the resulting roadmap on Next.js, TypeScript and PostgreSQL.
Sources and references
SOCRadar listed affected versions and fixes at socradar.io/blog/php2shell-cve-2026-109618-cve-2026-109619, and Recorded Future documented the exploitation timeline at recordedfuture.com/blog/php2shell-vulnerability-exploitation. Brandefense published fixed versions and a free check at brandefense.io/blog/php2shell-php-rce-cve-2026-109618-109619, and PatchMon covered fleet-wide patching at patchmon.net/blog/php2shell-cve-2026-109618-cve-2026-109619-php-rce-patch. SentinelOne published attack-technique guidance at sentinelone.com/blog/stopping-php2shell-how-sentinelone-protects-customers-from-this-attack-technique, Wiz Research disclosed the flaws at wiz.io/blog/php2shell-php-rce, CNBC covered the government shutdowns at cnbc.com/2026/10/21/government-websites-go-dark-as-software-flaw-sparks-security-scramble.html, the PHP Group lists supported versions at php.net/supported-versions.php, GDPR Article 33 sits at eur-lex.europa.eu/eli/reg/2016/679/oj, and CISA tracks known exploited vulnerabilities at cisa.gov/known-exploited-vulnerabilities-catalog.
Fixed PHP versions for the 72-hour patch window
| Branch | Upgrade to |
|---|---|
| 8.5 | 8.5.12 or later |
| 8.4 | 8.4.27 or later |
| 8.3 | 8.3.36 or later |
| 8.2 | 8.2.35 or later |
| 8.1 / 8.0 / 7.4 | Vendor or distribution backport, or upgrade to a supported branch |
| 7.3 and older | No fix. Upgrade the branch or take offline |
Restart every PHP worker after upgrading, because CVE-2026-109619 abuses state that survives on the old process.
The 72-hour response plan
- 1
Triage and inventory
List every PHP workload, its version, SAPI and owner, including containers, staging and appliances, then rank by internet exposure and data sensitivity.
- 2
Patch or isolate
Upgrade to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or apply a vendor backport, restart all PHP workers and rebuild containers; isolate anything unpatchable.
- 3
Apply interim mitigations
Disable session upload progress, lower post_max_size, enforce proxy limits, use container memory limits and deploy WAF rules while you queue the upgrade.
- 4
Detect and investigate
Review logs from 20 October 2026 for memory exhaustion bursts, oversized PHPSESSID cookies, web processes spawning shells, new PHP files, cron jobs and users.
- 5
Rotate secrets and harden
Rotate database, framework, payment, API, OAuth and JWT secrets, then harden PHP-FPM pools, disable dangerous functions and lock origins to the CDN.
- 6
Report and decide
Write a post-incident report, notify regulators if a breach occurred, brief leadership in business terms, and schedule the modernisation decision.
A patched or isolated estate, verified clean logs, rotated secrets, and a post-incident report you can hand to leadership, auditors or insurers.
Conclusion
App Corp's senior engineers can triage, patch and verify your PHP estate this week, then help you build something that will not need an emergency weekend next time. The next emergency should mean a dependency bump and a redeploy, not a weekend of manual server upgrades, and that outcome comes from removing the root cause once the fire is out rather than patching one flaw at a time. Treat this checklist as the response phase, and the modernisation decision as the phase that stops the pattern.
Frequently Asked Questions
Key Takeaways
- Upgrade to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, restart every PHP worker, rotate secrets, and hunt for compromise from before you patched
- Exploitation was reported before the patch shipped, so treat 20 October 2026 as the start of your review window
- Interim mitigations such as disabling session upload progress reduce exposure but do not make a system safe
- Detection focuses on server-level signals: memory-limit errors, oversized PHPSESSID cookies, and PHP processes spawning shells
- Rotate database, framework, payment, OAuth, JWT and TLS secrets after any possible memory disclosure
- Finish with a post-incident report, regulatory notifications where required, and a modernisation decision