How PHP2Shell affects request memory
Both PHP2Shell CVEs were published on 21 October 2026. They concern PHP runtime memory handling; application updates cannot replace runtime security patches.
1. Does PHP2Shell require an upload form?
A PHP endpoint can parse multipart input before application code, without any upload form. Upload progress touches state before initialization; its configurable PHP_SESSION_UPLOAD_PROGRESS marker cannot cover every PHP2Shell path.
Disable unused tracking and verify Web settings. Standard $_FILES uploads remain separate; test custom progress polling. PHP 8.5 has a fatal-error-backtrace path. Both patches and worker replacement remain necessary.
2. Which PHP2Shell response fits your deployment?
Compare PHP2Shell controls below. Complete runtime patches resolve both vulnerabilities; other layers provide partial containment with deployment-specific requirements.
| PHP2Shell Defense Method | Protection Level | Downtime Required | Works on EOL PHP (5.6–8.1)? | Best Use Case |
|---|---|---|---|---|
| Complete Upstream Patches | Replace Every Worker / Container | No (Unless Distro Backported) | Supported PHP 8.2–8.5; verify package provenance. | |
| Partial Session-Path Reduction | Worker Replacement Required | Yes (All PHP 5.4+ Versions) | Temporary session-path hardening only. | |
| Partial Session-Path Control | Nginx Reload; Verify PHP Workers | Yes | Additional FastCGI control; patch PHP. | |
| Heuristic / Vendor-Specific | No Origin Restart for Edge Rule | Yes | Partial fleet containment; bypasses remain. |
Complete fixes require patched builds and replacement of every worker. Verify backports when the displayed version is older.
Review official patch advisory3. What remains after patching?
Inventory origins and workers, deploy patches, replace workers and test traffic. Preserve evidence and maintain recovery plans. A patched PHP2Shell runtime does not remove webshells or stolen credentials; absent indicators cannot exclude compromise. Vulnerable rollbacks do not complete remediation.