Critical PHP2Shell RCE Flaws Leaked Before Official PHP Patch
Details regarding two critical unauthenticated remote code execution vulnerabilities in the core PHP runtime have leaked publicly prior to scheduled vendor patches. Dubbed php2shell and carrying a CVSS v4.0 score of 9.2, these flaws allow complete server takeover through malformed multipart POST requests.

Key Takeaways
- Two critical unauthenticated RCE vulnerabilities in core PHP (CVE-2026-109618 and CVE-2026-109619) carry a CVSS v4.0 rating of 9.2.
- Exploitation targets RFC 1867 multipart form-data handling in ext/session/session.c, triggering a heap use-after-free condition before user-space code executes.
- Vulnerable logic spans PHP 5.4.0 through PHP 8.x, but upstream patches are restricted to supported branches 8.2, 8.3, 8.4, and 8.5.
- Defenders can apply an interim configuration workaround by setting session.upload_progress.enabled = Off while coordinating full binary updates.
Security defenders must urgently verify exposure and consider disabling session upload progress across internet-facing web runtimes after technical exploit details for two critical PHP core vulnerabilities emerged before upstream patches were distributed. Dubbed PHP2Shell, these vulnerabilities carry a CVSS v4.0 base score of 9.2 and permit unauthenticated remote code execution across standard web application architectures. Because the PHP interpreter processes incoming multipart HTTP requests before application routing or authentication scripts execute, defensive teams face immediate operational exposure that demands aggressive perimeter containment.
Vulnerability Severity Rating
Affected Versions and Conditions
The scope of affected deployments spans enterprise web frontends, hosting panels, and embedded appliance software. Technical analysis indicates that the vulnerable logic is present across major release branches from PHP 5.4.0 through PHP 8.x. Official maintenance releases are restricted to supported active release branches, specifically PHP 8.2, PHP 8.3, PHP 8.4, and PHP 8.5. All end-of-life installations, including legacy PHP 5.x, PHP 7.x, PHP 8.0, and PHP 8.1 distributions, will receive no upstream vendor patches, creating persistent exposure for legacy systems.
Vulnerability exposure is not limited to bespoke web code or public hosting environments. Numerous enterprise software stacks bundle the PHP runtime directly to deliver administration consoles, internal APIs, and operational monitoring dashboards:
Content Management Frameworks: Enterprise web assets deployed on WordPress, Drupal, Joomla, WHMCS, or Magento environments process user input directly through native PHP parsers.
Administrative Hosting Panels: Commercial management platforms, such as cPanel, Plesk, and proprietary web administration consoles exposed to external networks.
Embedded Vendor Software: Virtual appliances, storage management consoles, and underlying operating system daemons that bundle
php.exeorphp-cgiwithout transparent runtime visibility.
Defenders should deploy comprehensive Attack Surface Management to discover shadow web instances, neglected staging environments, and undocumented administrative endpoints running vulnerable PHP binaries.
PHP Branch Support and Patch Availability
Affected versions
- PHP 5.4.0 through PHP 8.x
Fixed versions
- PHP 8.2
- PHP 8.3
- PHP 8.4
- PHP 8.5
Technical Root Cause
The underlying technical cause stems from heap memory mismanagement inside the RFC 1867 multipart form-data parsing engine within the PHP core session extension. Specifically, the flaw resides in ext/session/session.c inside the php_session_rfc1867_callback function. When an incoming HTTP POST request delivers a multipart payload, the PHP runtime automatically initializes internal structures to track upload progress before handing execution to user-space code.
By transmitting specially crafted multipart boundary strings and manipulated header structures, an unauthenticated remote attacker can trigger a heap memory corruption state, specifically a use-after-free primitive. The exploit does not require the underlying web application to support file uploads or possess valid user session credentials; the mere arrival of the HTTP request at the interpreter initiates the vulnerable callback logic.
Attack Chain Mechanics
Adversaries convert an unauthenticated HTTP request into interactive command execution through a four-stage exploitation sequence mapped to MITRE ATT&CK techniques:
Initial Access (T1190): The adversary transmits a crafted HTTP POST request with manipulated multipart form-data boundaries directly to any publicly reachable PHP script or routing endpoint.
Memory Corruption (T1203): The interpreter invokes
php_session_rfc1867_callback, triggering a use-after-free condition on the heap that diverts runtime execution flow into memory space controlled by the attacker.Execution (T1059.004 / T1059.001): The hijacked worker process launches native command shells (such as
/bin/sh,/bin/bash, orcmd.exe) operating under the permissions of the web server worker daemon (such aswww-data,apache, orSYSTEM).Persistence and Web Shell Deployment (T1505.003): Post-exploitation tools drop staging backdoors into writable directories, such as
/tmp,/dev/shm, or web root folders, establishing persistent network footholds.
Exploitation Status
Security researchers at watchTowr independently confirmed the vulnerabilities and reproduced remote code execution under laboratory conditions following the public leak of the php2shell tool demonstration. Despite the emergence of functional proof-of-concept demonstrations, continuous telemetry across partner monitoring networks has not identified widespread, automated in-the-wild exploitation prior to coordinated upstream patch distribution.
However, the window between technical disclosure and mass weaponization is exceptionally short. Historical exploitation trends show that foundational web runtime vulnerabilities attract automated scanning clusters, botnets, and initial access brokers within hours of public weaponization. Defensive delays significantly elevate the probability of unauthorized server intrusion before routine change management windows conclude.
php2shell Remote Code Execution Attack Flow
- 1Initial Access
Crafted HTTP POST with multipart boundaries (T1190)
- 2Memory Corruption
Heap use-after-free in php_session_rfc1867_callback (T1203)
- 3Command Execution
Web worker daemon spawns /bin/sh or cmd.exe (T1059)
- 4Persistence
Web shell dropped into /tmp, /dev/shm, or web root (T1505.003)
Blast Radius
The operational blast radius of php2shell extends far beyond isolated web server instances. Because PHP underpins a massive portion of global internet infrastructure, successful compromise directly threatens internal corporate perimeters, credential stores, and backend databases.
Once an adversary gains interactive command execution under the web worker identity, the compromise frequently escalates across infrastructure boundaries:
Credential Harvesting: Adversaries extract plaintext database credentials, cloud access tokens, and cryptographic salts stored within web configuration files.
Internal Network Reconnaissance: Compromised web servers act as internal jump boxes to probe enterprise subnets, Active Directory domain controllers, and unsegmented management networks.
Supply Chain and Data Risk: Intruders alter production application logic, tamper with database records, or exfiltrate sensitive customer records directly through internal database connections.
Conducting rigorous Penetration Testing allows enterprises to simulate post-compromise privilege escalation, verifying whether perimeter server compromise can be successfully contained before adversaries breach internal active directory domains.
Blast Radius & Escalation Paths
- Credential Stores & Secretshigh
- Internal Subnets & Active Directoryhigh
- Production Application Logic & Datahigh
- Secondary Web Shells (/tmp, /dev/shm)medium
Patch, Mitigation, and Verification
Securing enterprise infrastructure against CVE-2026-109618 and CVE-2026-109619 requires a multi-layered response incorporating emergency configuration hardening, binary patching, and runtime behavioral auditing.
1. Immediate Upstream Patching
System administrators must immediately upgrade PHP installations across production, staging, and container environments to the latest patched minor versions of supported branches (PHP 8.2, 8.3, 8.4, and 8.5) as packages become available through official distribution channels.
2. Interim Workaround for Session Upload Progress
If immediate binary recompilation or package upgrading cannot be executed, administrators should eliminate the primary trigger path by disabling session upload progress globally. Apply the following configuration directive inside php.ini:
session.upload_progress.enabled = OffFor enterprise deployments utilizing PHP-FPM pools, enforce this restriction across all administrative pool definitions:
php_admin_flag[session.upload_progress.enabled] = offWhile this configuration change mitigates the documented RFC 1867 exploit path, it remains an interim stopgap and must not replace complete binary upgrading.
3. Behavioral Detection and Process Telemetry
Security operations centers must inspect endpoint detection telemetry for anomalous child processes spawned by web server daemons, including php-fpm, php-cgi, apache2, httpd, and nginx. Generate immediate critical alerts if web workers spawn:
Interactive command interpreters:
/bin/sh,/bin/bash,cmd.exe, orpowershell.exe.Script execution engines:
python,perl, orruby.Data transfer binaries:
curl,wget,nc,ncat, orcertutil.exe.
On unmonitored Linux servers without complete endpoint agents, administrators should inspect web server access logs for anomalous multipart POST requests directed at non-interactive endpoints or static media assets.
4. Exposure Validation and Assessment
Organizations must systematically verify that all internet-exposed assets are identified, prioritized, and remediated. Engaging structured Vulnerability Assessments enables security teams to validate patch levels across distributed cloud architectures, retire end-of-life software stacks, and ensure resilient defense posture against runtime interpreter exploits.
How to Defend Against Similar Threats
- Immediately update PHP runtime packages to the latest patched releases across supported branches (PHP 8.2, 8.3, 8.4, and 8.5).
- Disable session.upload_progress.enabled in php.ini and PHP-FPM configuration pools as an emergency stopgap mitigation.
- Implement process telemetry detection rules to identify command interpreters and network utilities spawned directly by web server daemons.
- Conduct external attack surface discovery to locate and isolate legacy, unpatched, or end-of-life PHP installations.
Threat Intel FAQ
Can attackers exploit php2shell if the application does not have a file upload form?
Will older PHP releases like PHP 7.4 receive security patches for this flaw?
Could a similar threat affect your organization?
If your team may be exposed to a similar threat, FemtoSec can help validate blast radius, prioritize remediation, and connect the issue to a practical security program.
Related Threats

July 18, 2026
WP2SHELL: Critical Pre-Auth RCE in WordPress Core
A critical pre-authentication remote code execution vulnerability chain known as WP2SHELL has been discovered in WordPress Core, affecting millions of websites. Learn the mechanics of the REST API route confusion and SQL injection, and access concrete detection logic and remediation guidance.

June 21, 2026
Libsodium and NaCl Zero-Day Risks: Enterprise Impact
A threat actor is reportedly offering a malware framework exploiting vulnerabilities in libsodium and NaCl. We analyze the risks to enterprise cryptographic integrity and provide mitigation steps.

June 19, 2026
Windows 11 Kernel Framework Leak Analysis
An alleged zero-day exploitation framework targeting Windows 11 has emerged on underground forums. We analyze the technical implications and defense strategies.