---
title: PHP2Shell Vulnerabilities Allow Remote Code Execution in PHP Runtimes
url: https://www.broadcom.com/support/security-center/protection-bulletin/php2shell-vulnerabilities-allow-remote-code-execution-in-php-runtimes
description: Critical PHP2Shell flaws allow remote code execution via custom form requests. Patch to builds 8.5.12, 8.4.27, or 8.3.36.
---

# PHP2Shell Vulnerabilities Allow Remote Code Execution in PHP Runtimes

October 21, 2026

A pair of critical security flaws in the core PHP runtime engine, collectively designated PHP2Shell, have been disclosed. Tracked as CVE-2026-109618 and CVE-2026-109619, both are use-after-free conditions during out-of-memory error handling and request cleanup inside default PHP components, including upload-progress functions and request parsers. Unauthenticated remote adversaries can leverage crafted multipart/form-data requests to execute arbitrary code or extract sensitive memory residue before application code runs. Both carry a CVSS v4.0 score of 9.2.

The primary intent of these exploits is server takeover (RCE → web shell → persistence/pivot), with crash/DoS as the easy fallback and credential/memory theft as a quieter alternative. Harm to visitors is a downstream effect of the server being owned, not the exploit’s own mechanism.

- **Affected:** all PHP versions before 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on any installation that serves web requests (PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, LiteSpeed).
- **Highest risk:** Apache with mod_php. There, the attack completes before any application code runs, so application logs may show nothing.
- **Root cause:** when PHP aborts a request on an out-of-memory or fatal error, it can leave stale internal state. A later request handled by the same worker can then reuse it. Demonstrated outcomes include remote code execution, arbitrary file reads and memory disclosure.
- **Broadcom ESG product impact:** Please monitor the [Enterprise Security Group Advisory for PHP2Shell](https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/SecurityAdvisories/0/39404) for ESG product applicability, patch and mitigation information.
- **Exploitation status:** details leaked on 20 October, before patches existed, and public proof-of-concept code is reported. Treat any internet-facing PHP server that was unpatched since 20 October as potentially exposed.

**Apply the fix**

The recommended solution at this time is to upgrade PHP, or patch using the published updates on PHP's [download page](https://www.php.net/downloads.php). Patching is the recommended remediation.

PHP 8.5 → 8.5.12, PHP 8.4 → 8.4.27, PHP 8.3 → 8.3.36, PHP 8.2 → 8.2.35

- **Restart after upgrading.** Restart PHP-FPM pools and Apache so no worker keeps running the old binary. PHP-FPM must be patched too.
- **Unsupported branches (8.1, 7.x, 5.x).** The PHP project has published no upstream fix. Check your OS vendor for backported packages; for example, Red Hat has an advisory for PHP 7.4 (RHSA-2026:87080) and Fedora has issued updates. Where no backport exists, apply the interim mitigations below and plan an upgrade to a supported branch.
- **Containers and appliances.** Rebuild images on patched base images, and check third-party appliances and hosting providers that embed PHP.
- **Find every instance.** Inventory internet-facing hosts first, then internal ones. Check the version the web server actually runs (for example php-fpm -v or the Apache module), not only the command-line php -v, since they can differ.

**Interim mitigations if you cannot patch immediately**

If immediate patching is not feasible, PHP has shared additional recommendations in its [advisory](https://www.php.net/archive/2026.php%232026-10-21). The steps below reduce exposure but do not fully address either CVE. Use them only until the upgrade is done, and test each one first.

- **Disable session upload-progress tracking.** Set session.upload_progress.enabled = 0 in the active php.ini.
- **Disable OPcache.** Set opcache.enable = 0. This removes the OPcache stale-cache technique, which gives arbitrary file reads. Expect a noticeable performance cost.
- **Check fatal-error backtraces.** One technique requires fatal-error backtraces to be enabled. Turn them off if they are on, and follow the PHP advisory for the exact setting.
- **Reload PHP.** Restart PHP-FPM or Apache so the new settings take effect.
- **Put a WAF in front.** Several WAF vendors have released virtual-patch rules covering the anomalous multipart and session traffic these exploits use. Confirm with your vendor that the rule is deployed and in blocking mode.
- **Reduce exposure.** Restrict access to PHP applications that do not need to be public. Run PHP workers with least privilege, so a compromise exposes as few files, credentials and connected services as possible.

Symantec products protect you from this threat, identified by the following:

**Behavior-Based Protection** available in Symantec Endpoint Protection (SEP), Symantec Endpoint Security Complete (SESC), Symantec Endpoint Security Agent (ESA), and Symantec Cloud-Based XDR (CBX) and all Carbon Black products is identified by the following. The Sonar signatures below detect suspicious behavior associated with PHP-hosting web server processes, which may indicate post-exploitation activity.

- SONAR.SuspBeh!gen831
- SONAR.SuspBeh!gen880
- SONAR.SuspBeh!gen910
- SONAR.SuspLaunch!g516
- SONAR.SuspLaunch!g519
- SONAR.SuspLaunch!g552
- SONAR.SuspLaunch!g587
- SONAR.SuspLaunch!g595
- SONAR.SuspLaunch!g596
- SONAR.SuspReg!gen70
- SONAR.SuspReg!gen72
- SONAR.SuspWrite!g19
- SONAR.SuspLaunch!g577
- SONAR.SuspStart!gen42
- SONAR.SuspStart!gen50
- SONAR.UACBypass!gen34

**EDR-Based Visibility** available in Symantec Endpoint Detection (SEDR), and Carbon Black Cloud (CBC) and On-Prem products is identified by the following:

- [Carbon Black Cloud] Linux PHP Suspicious application execution: (parent_name:php-fpm OR parent_name:php-cgi OR parent_name:httpd OR parent_name:apache2) AND (process_name:sh OR process_name:bash OR process_name:python OR process_name:perl OR process_name:curl OR process_name:wget OR process_name:nc)
- [Carbon Black Cloud] Linux Suspicious Command Lines: process_cmdline:("/def/tcp/" OR "/dev/tcp/" OR fsockopen OR mkinfo OR mkfifo)

- [Carbon Black Cloud] Windows PHP suspicious application execution: (parent_name:php-cgi.exe OR parent_name:php.exe OR parent_name:php-win.exe OR parent_name:php-fpm.exe OR parent_name:phpdbg.exe) AND (process_name:cmd.exe OR process_name:powershell.exe OR process_name:certutil.exe OR process_name:cscript.exe).(process_name:nc.exe AND process_cmdline:"-e") OR (process_name:powershell.exe AND (process_cmdline:"System.Net.Sockets.TcpClient" OR process_cmdline:"New-Object Net.WebClient"))

- [Carbon Black OnPrem] Linux PHP Suspicious application execution: (parent_name:php-fpm OR parent_name:php-cgi OR parent_name:httpd OR parent_name:apache2) AND (process_name:sh OR process_name:bash OR process_name:python OR process_name:perl OR process_name:curl OR process_name:wget OR process_name:nc)

- [Carbon Black OnPrem] Linux Suspicious Command Lines: cmdline:"/def/tcp/" OR cmdline:"/dev/tcp/" OR cmdline:fsockopen OR cmdline:mkinfo OR cmdline:mkfifo

- [Carbon Black OnPrem] Windows PHP suspicious application execution: (parent_name:php-cgi.exe OR parent_name:php.exe OR parent_name:php-win.exe OR parent_name:php-fpm.exe OR parent_name:phpdbg.exe) AND (process_name:cmd.exe OR process_name:powershell.exe OR process_name:certutil.exe OR process_name:cscript.exe)

- [Carbon Black OnPrem] Windows Suspicious Command Lines: (process_name:nc.exe AND cmdline:"-e") OR (process_name:powershell.exe AND (cmdline:"System.Net.Sockets.TcpClient" OR cmdline:"New-Object Net.WebClient")) 

- [SEDR] Windows PHP suspicious application execution: (Actor File Name:php-cgi.exe OR Actor File Name:php.exe OR Actor File Name:php-win.exe OR Actor File Name:php-fpm.exe OR Actor File Name:phpdbg.exe) AND (Process Name:cmd.exe OR Process Name:powershell.exe OR Process Name:certutil.exe OR Process Name:cscript.exe)

**File-Based Antivirus Protection** available in all Symantec Endpoint, Essential, Network, as well as VMware vDefend Security product lines is identified by the following;

- Hacktool.Php2shell

**Network-Based Protection** available in Symantec Endpoint Protection (SEP), Symantec Security Endpoint Complete (SESC), Symantec Endpoint Security Agent (ESA), Symantec Cloud-Based XDR (CBX), and Symantec Edge Secure Web Gateway (SWG) products is identified by the following:

- [34889] Web Attack: PHP Shell Upload 15 **proactively** detects malicious PHP shell uploads in HTTP POST requests, a technique used in PHP2Shell exploitation. This signature is not specific to this CVE; it detects shell uploads generically and was released on 10/28/2024.
- [35463] Web Attack: PHP2Shell Scanning Activity 2 – detects inbound web requests carrying a known PHP web-shell marker, indicating an attempt to plant a malicious shell on a web server.
- [35464] Web Attack: PHP Web Runtime CVE-2026-109619 – detects inbound web requests that abuse a PHP feature to inject PHP code, indicating an attempt to run code on a web server.
- Multiple silent signatures are being released; we will monitor them, review the results, and continue investigating.
- [SWG] The standard reverse-proxy policy can log or block multipart/form-data requests to PHP paths.

**Policy-Based Protection** available in Carbon Black App Control and Symantec Data Center Security (DCS) is identified by the following:

Carbon Black App Control customers can use the execution control rules below to monitor, and later block, behavior potentially related to PHP2Shell exploitation. Start every rule in Report mode. Update the rules with known IOCs as they are published, and verify reported activity before switching any rule to Block.

- **Linux PHP suspicious application execution (Linux, Report)** — process php-fpm, php-cgi, httpd or apache2 running sh, bash, python, perl, curl, wget or nc.
- **Linux suspicious command lines (Linux, Report)** — any process whose command line matches <cmdline:/dev/tcp/>, \<cmdline:fsockopen\> or \<cmdline:mkfifo\>*.
- **Windows PHP suspicious application execution (Windows, Report)** — process php-cgi.exe or php.exe running cmd.exe, powershell.exe, certutil.exe or cscript.exe.
- **Windows suspicious command lines (Windows, Report)** — any process whose command line matches \<cmdline:-e\>nc.exe, \<cmdline:System.Net.Sockets.TcpClient\>powershell.exe or <cmdline:New-Object Net.WebClient>powershell.exe.

Symantec Data Center Security (DCS) has a built-in sandbox for Apache/PHP and if DCS agent is running on a host server executing a vulnerable web application (e.g., Apache/Nginx running mod_php or PHP-FPM), the **DCS Built-in Sandbox / Policy Rulesets** provide runtime protection against post-exploitation activities.

- **Static / Network Detection:** IPS/Network signatures specifically targeting php2shell stale-state memory payloads may show as *Not Found* unless custom network signatures or dedicated intrusion definitions are added.

- **Behavioral / Process Protection (Built-in Sandbox):** The DCS Host Security Agent operates at the OS kernel layer. While the application worker memory itself gets corrupted, any attempt by the attacker to convert that memory corrupt primitive into secondary actions—such as spawning unauthorized shell commands (/bin/sh, cmd.exe), executing dropped binary payloads, modifying core system binaries, or attempting unauthorized privilege escalation—will be **intercepted and blocked** by DCS host intrusion prevention sandbox policies.

Additional product protections are in development; updates will be posted here as information becomes available.
