Skip to content
.ca
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

Indicators of Compromise2
2cve
Improve this report

Send corrections, useful missing information, or quality feedback. It is private and will not appear as a comment.

Feedback type

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

  1. Initial Access: Unauthenticated POST request exploits PHP2Shell via IIS PHP-CGI handler
  2. Execution: w3wp.exe spawns php-cgi.exe which launches cmd.exe
  3. Execution: cmd.exe executes packed binary from disk on compromised server
  4. Defense Evasion: Shellcode uses PEB-walking to resolve and load WS2_32.dll
  5. 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)

copy:
CVEProductSeverityDescription
CVE-2026-109618PHP runtimeCriticalMemory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request.
CVE-2026-109619PHP runtimeCriticalMemory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request.

Detection Engineering Assessment

Hunting Hypotheses

copy:
HypothesisTelemetryStageFP Risk
Web worker processes (w3wp.exe) spawning command shells (T1059.003) indicate post-exploitation from PHP vulnerabilityProcess creation with parent w3wp.exeExecutionLow — web workers rarely spawn cmd legitimately
PHP-CGI handler process spawning unexpected child processes indicates exploitation of T1190Process tree with php-cgi.exe parentInitial AccessLow — 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 librariesDefense EvasionMedium — 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
IOCs · 2
.txt.json
Showing defanged values
  • cve
    CVE-2026-109618Memory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request.
  • cve
    CVE-2026-109619Memory corruption allowing unauthenticated arbitrary code execution via crafted HTTP request.