What Is PHP2Shell and Why Is It Critical?
Newly disclosed critical PHP vulnerabilities - collectively known as PHP2Shell (CVE-2026-109618 and CVE-2026-109619) - represent a grave threat to global internet infrastructure. Both security flaws carry a CVSS v4.0 rating of 9.2 (Critical) and allow unauthenticated Remote Code Execution (RCE).
To understand the blast radius, consider that PHP powers approximately 70% of all websites. This includes dominant Content Management Systems (CMS) like Magento, WordPress, Drupal, and Joomla, web hosting control panels like cPanel and Plesk, and countless enterprise applications that silently bundle PHP binaries.
PHP2Shell is uniquely dangerous because an unauthenticated attacker can trigger these vulnerabilities during initial HTTP(S) request startup, before any application code, input validation, or login mechanisms execute. As a result, every web-facing PHP runtime must be evaluated as immediately exposed.
Discovery, Embargo Leak, and Active Exploitation
The discovery and release cycle of PHP2Shell highlights a seismic shift in the threat landscape:
- AI-Assisted Discovery: The vulnerabilities were independently identified in August 2026 by security firm Calif (using OpenAI's GPT-5.6 Sol model as part of the "Patch the Planet" initiative) and cloud security vendor Wiz (using Gemini 4 Argon and GPT-5.6 Sol alongside custom research tools).
- Leaked Disclosure & Pre-Patch Exploitation: A prematurely published proof-of-concept video, alongside leaks on Hacker News and social media on October 20, 2026, destroyed the embargo. Amazon Threat Intelligence telemetry from MadPot confirmed active exploitation attempts dating back to October 17, four days prior to official vendor patch availability.
- Global Operational Impact: Following advisories from CERT-EU, the UK National Cyber Security Centre (NCSC), and the US NSA, organisations worldwide instituted emergency downtime. High-profile platforms—including Wikimedia supporting services, the Internet Archive, French Interior Ministry sites, Danish national education systems, Finnish government web services, and Dutch government portals—were forced offline to mitigate risk prior to patching.
Technical Breakdown: Mechanics of CVE-2026-109618 & CVE-2026-109619
The two vulnerabilities stem from flaws in how the PHP engine manages memory exhaustion and global state across request lifecycles.
CVE-2026-109618 (Out-of-Memory Handling & Memory Corruption):
- Mechanics: When PHP parses incoming request data (such as application/x-www-form-urlencoded or multipart form data), internal functions like _zend_hash_str_add_or_update_i() update hash table entry counters (nNumUsed and nNumOfElements) before allocating memory for the string key via zend_string_init().
- Exploitation Path: If the key allocation exceeds PHP's memory_limit, PHP aborts execution by invoking longjmp(). This leaves an uninitialised bucket entry in the global $_POST array while its counters reflect that the entry exists. During request shutdown, PHP attempts to clean up the array by reading the uninitialised bucket memory. By using heap grooming techniques (sending forged binary payloads in preceding parameter fields), an attacker populates this uninitialised memory with arbitrary pointers. PHP interprets these bytes as valid data structures and executes the attacker's destructor callback - calling functions like system() with an attacker-controlled command string.
CVE-2026-109619 (Lingering / Stale Global State Flaw):
- Mechanics: PHP worker processes (such as PHP-FPM or Apache mod_php workers) process multiple HTTP requests sequentially over their lifecycle. Global state variables can retain pointers to memory allocated for a specific request. If a fatal error occurs and memory is freed without resetting these internal global pointers, a "use-after-free" condition is created across request boundaries.
-
Exploitation Path: Features like session.upload_progress.enabled (which is enabled by default in PHP) parse upload progress during request startup before application code runs or session_start() is called. A subsequent request hitting the same web worker process can interact with stale state prior to normal variable initialisation, allowing an attacker to achieve unauthenticated remote code execution across request boundaries. (On PHP 8.5, fatal error backtrace handling presents an additional vector via fatal_error_backtraces).
Affected PHP Versions and Safe Upgrade Targets
All active PHP branches are affected and require immediate updates to official fixed releases.
| PHP Branch |
Support Status |
Safe Patched Version |
Recommended Action |
|
8.5
|
Active Support |
8.5.12 |
Update immediately |
| 8.4 |
Active Support |
8.4.27 |
Update immediately |
| 8.3 |
Security Fixes Only |
8.3.36 |
Update immediately |
| 8.2 |
Security Fixes Only |
8.2.35 |
Update immediately |
| 8.1 or older |
End-Of-Life (EOL) |
None (Upstream) |
Migrate or apply vendor backports |
Warning Regarding EOL Versions and Third-Party Repositories:
- Minimal Source Backports: Upstream pre-compiled binaries are not provided for End-of-Life branches (PHP 8.1, 8.0, 7.4). However, the PHP security team published minimal source-code backports for PHP 7.4, 8.0, and 8.1 for organisations that compile PHP from source.
- Repository Delays: Volunteer-maintained package repositories (such as rpms.remirepo.net) do not receive embargoed fixes and will not have updated packages on release day. Systems relying on these repositories must immediately switch to official distribution-maintained LTS packages or build patched binaries from source.
Actionable 3-Step Remediation Strategy
Security operations and IT infrastructure teams should execute this remediation plan immediately.
Identify all environments running PHP runtime engines - including PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, and LiteSpeed. Do not limit discovery to standard web servers; search container registries, CI/CD deployment pipelines, hosting control panels, and third-party software that embeds standalone PHP binaries (php.exe, php-cgi.exe).
Use the following platform-specific audit commands to verify installed PHP packages and check if vendor changelogs reflect patches for both CVEs:
dpkg -l | grep php
apt changelog php[VERSION_NUMBER]-cli | grep -E
"CVE-2026-109618|CVE-2026-109619"
- RHEL / CentOS / Rocky Linux / AlmaLinux:
rpm -qa | grep php
rpm -q php-cli --changelog | grep -E "CVE-2026-109618|CVE-2026-109619"
apk info | grep php
Step 2: Apply Patches Immediately
Update all active PHP runtimes to their designated safe release targets (8.2.35, 8.3.36, 8.4.27, or 8.5.12) or install verified Linux distribution packages that backport fixes for both CVEs. Patching the underlying engine is the only complete remediation - Do not delay.
Step 3: Restart Web Workers & Rebuild Container Images
Miss these steps and you could still be exposed.
Detecting Exploitation: Log Analysis & Telemetry Signals
Because exploitation occurs prior to script execution, standard application-level logging will not catch attack attempts. Security engineering teams should hunt for indicators across three distinct layers:
Correlate these errors with segmentation faults in web server error logs (e.g., Apache AH00052: child pid ... exit signal Segmentation fault (11)).
-
Process Lineage Anomalies: Monitor endpoint detection and response (EDR) telemetry for web worker accounts (www-data, apache, nobody) spawning child shell processes or network utilities
apache2 (www-data) -> sh -c ... -> bash -> wget/curl
- Web Application Firewall (WAF) & Proxy Signals: Inspect incoming HTTP(S) request bodies at the edge or reverse proxy for:
- Form submissions (application/x-www-form-urlencoded) containing unusually long parameter names (e.g., parameter keys ~3.5 MB in length).
- Form submissions containing raw binary payload strings or non-printable null bytes in parameter values associated with empty field names.
Mitigations & Operational Workarounds
While temporary configuration adjustments exist to restrict specific attack vectors while patches are deployed, no configuration workaround fully cures these vulnerabilities. If temporary mitigations are deployed, teams must understand the following technical operational caveat:
- Isolation of Unpatched Assets: If immediate patching or verified reverse-proxy boundary controls (WAF rules filtering oversized form field names) cannot be applied, organisations should follow direct guidance from CERT-EU, the UK NCSC, and the NSA: isolate internet-facing applications or take unpatched PHP systems temporarily offline until vendor patches can be installed and verified.