A pair of critical remote code execution (RCE) vulnerabilities—dubbed "php2shell"—were disclosed and patched across all active PHP branches. Carrying maximum severity ratings (CVSS 9.2), these flaws allow unauthenticated attackers to hijack web servers before application logic ever executes.
Because PHP powers over 70% of web servers worldwide (including WordPress, Laravel, Drupal, and custom web applications), immediate patch deployment is essential.
Technical Analysis: What Went Wrong?
The advisories cover two distinct memory corruption mechanisms within the core PHP engine:
1. CVE-2026-109618: Out-Of-Memory (OOM) Handling Corruption
The Mechanism: When a request exceeds PHP's configured
memory_limit, the runtime forces an immediate abort usinglongjmp().The Flaw: If an abort occurs while internal request structures are partially initialized—such as during form upload parsing—the cleanup handler mistakenly attempts to free uninitialized pointers.
The Impact: Attackers can craft malicious HTTP requests that intentionally exceed memory thresholds, leading to heap manipulation and unauthenticated Remote Code Execution.
2. CVE-2026-109619: Stale Global State Between Worker Requests
The Mechanism: Under worker-reuse environments (such as PHP-FPM, Apache
mod_php, FrankenPHP, and LiteSpeed), worker processes handle sequential requests without restarting.The Flaw: When an unhandled fatal error breaks a request execution, certain request-owned memory states survive after allocation memory has been freed.
The Impact: A subsequent request allocated to the same worker process can access this stale, attacker-influenced memory prior to proper re-initialization, opening another vector for RCE.
Who Is Affected?
Every web server running unpatched PHP binaries is vulnerable:
PHP Version BranchVulnerable VersionsFixed In VersionStatus PHP 8.5Pre-8.5.128.5.12Active Branch PHP 8.4Pre-8.4.278.4.27Active Branch PHP 8.3Pre-8.3.368.3.36Active Branch PHP 8.2Pre-8.2.358.2.35Active Branch PHP 8.1 & OlderAll versionsNo Upstream PatchEnd-of-Life (EOL)
Critical Note for Legacy Environments: Upstream PHP will not release security backports for EOL versions like PHP 8.1, 7.4, or 5.6. Applications running on unsupported PHP versions must be upgraded to PHP 8.2 or newer immediately.
Action Plan & Remediation
+---------------------------------------------------------------+
| EMERGENCY PATCH WORKFLOW |
+---------------------------------------------------------------+
| 1. Update PHP Engine Binaries (8.5.12, 8.4.27, 8.3.36, 8.2.35) |
| 2. Rebuild Container & Serverless Images |
| 3. Apply Temporary INI Mitigations (If Patch Delayed) |
| 4. Restart All PHP Worker Processes (php-fpm / apache2) |
+---------------------------------------------------------------+
Primary Fix: Package Updates
Update server software through system package managers, Docker image updates, or cloud provider channels:
# Ubuntu / Debian
sudo apt update && sudo apt upgrade php-fpm php-cli
# RHEL / AlmaLinux / Rocky Linux
sudo dnf update php php-fpm
# Verify deployment
php -v
If using managed cloud platforms (such as AWS Elastic Beanstalk, Google Cloud Run, or Azure App Service), check your vendor's release channel and trigger a service redeployment to pull updated base images.
Temporary Mitigations (If Immediate Patching Isn't Possible)
If environment constraints prevent an immediate runtime update, apply the following server-level workarounds:
Disable Session Upload Progress: In your global
php.inior FPM pool configuration:session.upload_progress.enabled = 0Restrict Upload Limits at Proxy Level: Lower
post_max_sizeand enforce body payload limits upstream in Nginx, Caddy, or Apache before requests reach PHP-FPM.Restart Workers: Always run
sudo systemctl restart php-fpmafter changing global runtime directives.
Key Takeaway
"php2shell" serves as a reminder of the risks associated with legacy runtimes and unpatched infrastructure. System administrators, DevOps engineers, and application owners should prioritize applying security updates and verifying upstream container builds.

