4 mincritical
PHP2Shell Is Hitting Windows Servers in the Wild. We Stopped It.
PHP2Shell exploits (CVE-2026-109618/619) target Windows IIS servers running PHP-CGI, enabling unauthenticated remote code execution; 110 million end-of-life PHP installations cannot be patched. Morphisec confirmed PHP2Shell exploitation against Windows IIS servers running PHP-CGI, the first documented Windows target. Attackers achieve unauthenticated code execution via crafted POST requests, then deploy packed payloads using PEB-walking shellcode to load networking libraries and establish reverse shells. 110 million PHP installations on end-of-life branches have no available patches, making compensating controls essential.
Sens:■ ImmediateConf:highAnalyzed:2026-11-05Z.ai
Authors: Tommy Perniciaro
ActorsPHP2ShellVULCANRAT
Source:Morphisec
Detection / HunterZ.ai
Immediate Actions
- Apply PHP patches for supported versions 8.2 through 8.5 immediately
- Disable session.upload_progress.enabled in PHP configuration
- Set memory_limit to -1 with container-level memory enforcement
- Block multipart POST requests on routes not requiring file uploads
Key Takeaways
- Both CVEs rated CVSS 9.2 for unauthenticated remote code execution via single HTTP POST
- Patches available only for PHP 8.2-8.5; branches 7.4 and older receive no backports
- Attack chain: w3wp.exe to php-cgi.exe to cmd.exe to packed binary to reverse shell
- Shellcode loads WS2_32.dll via PEB-walking for outbound network connectivity
- VULCANRAT malware family identified in post-exploitation activity
- Sophos recommends hunting exposed PHP servers from August 1, 2026 onward
Attack Chain
- Initial Access: Unauthenticated POST request exploits PHP2Shell via IIS PHP-CGI handler
- Execution: w3wp.exe spawns php-cgi.exe which launches cmd.exe
- Execution: cmd.exe executes packed binary from disk on compromised server
- Defense Evasion: Shellcode uses PEB-walking to resolve and load WS2_32.dll
- C2: Reverse shell established to external attacker command-and-control server
Affected Systems
- Windows Server with IIS and PHP-CGI
- PHP 8.2 through 8.5 (patches available)
- PHP 8.0 and 8.1 (end-of-life)
- PHP 7.x and 5.x (end-of-life)
Vulnerabilities (CVEs)
| CVE | Product | Severity | Description |
|---|---|---|---|
| CVE-2026-109618 | PHP runtime | Critical | Memory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request. |
| CVE-2026-109619 | PHP runtime | Critical | Memory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request. |
Detection Engineering Assessment
Hunting Hypotheses
| Hypothesis | Telemetry | Stage | FP Risk |
|---|---|---|---|
| Web worker processes (w3wp.exe) spawning command shells (T1059.003) indicate post-exploitation from PHP vulnerability | Process creation with parent w3wp.exe | Execution | Low — web workers rarely spawn cmd legitimately |
| PHP-CGI handler process spawning unexpected child processes indicates exploitation of T1190 | Process tree with php-cgi.exe parent | Initial Access | Low — php-cgi spawning shells is abnormal |
| Web worker processes loading WS2_32.dll via PEB-walking indicates shellcode preparing C2 (T1027.002) | Image load events for networking libraries | Defense Evasion | Medium — legitimate apps may load WS2_32.dll |
Required Log Sources
- Process creation logs (Sysmon EID 1)
- Network connection logs (Sysmon EID 3)
- IIS W3SVC logs
- PHP error logs
- Image load events (Sysmon EID 7)
Control Gaps
- Signature-based AV cannot detect novel packed shellcode
- WAF rules may not block all exploit payload variants
- End-of-life PHP branches have no vendor patch available
- Memory-based attacks evade traditional file-scanning controls
Recommendations
Infrastructure Hardening
- Upgrade end-of-life PHP installations to supported version 8.2 or later
- Deploy WAF rules filtering crafted multipart POST payloads
- Containerize PHP applications with enforced memory limits
- Network-segment exposed web servers from internal infrastructure
User Protection
- Hunt exposed PHP servers for compromise from August 1, 2026 onward
- Review web server worker process spawning activity logs
- Monitor for unexpected outbound connections from web servers
- Audit new files in web-accessible directories
MITRE ATT&CK Mapping
MITRE ATT&CK Mapping3 techniques
Tactic
Initial Access
Tactic
Execution
Tactic
Stealth
Showing defanged values
- cveCVE-2026-109618Memory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request.
- cveCVE-2026-109619Memory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request.