Skip to content
.ca
4 mincritical

Analysis of the GitHub “php2shell” Repository: Public PoCs and Defense Tools That Spread Immediately After the Disclosure of the PHP Vulnerability

Two critical PHP RCE vulnerabilities (CVSS 9.2) triggered rapid GitHub PoC proliferation; active exploitation observed on honeypots same day as disclosure. Two PHP memory-handling flaws enable unauthenticated remote code execution with CVSS 9.2, highest risk in mod_php. Within hours of disclosure, 99 GitHub repositories named 'php2shell' appeared, 83% of community interest went to offensive PoCs over defensive tools. watchTowr confirmed active exploitation on honeypots the same day.

Sens:■ ImmediateConf:mediumAnalyzed:2026-11-05Z.ai

Authors: ATCP

Source:AhnLab ASEC

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

  • Update PHP to patched versions 8.5.12, 8.4.27, 8.3.36, or 8.2.35 immediately
  • Set session.Upload_progress.Enabled to Off on servers that cannot be patched now
  • Check internet-exposed PHP servers for compromise: abnormal multipart requests, suspicious web root files, unexpected web server account processes
  • Prioritize patching mod_php environments as they carry the highest exploitation risk

Key Takeaways

  • 99 of top 100 'php2shell' GitHub repos addressed these CVEs, nearly all created October 21.
  • 83% of stars (1,158 of 1,394) went to offensive PoC repos; defensive tools received only 148 stars.
  • Patched versions: 8.5.12, 8.4.27, 8.3.36, 8.2.35; versions 7.4-8.1 have source backports only.
  • watchTowr observed actual exploitation on honeypot network on October 21, the disclosure date.
  • Corelight released Zeek and Suricata detection rules on October 18, two days before first PoC.
  • session.Upload_progress.Enabled can be set to Off as temporary partial mitigation.

Attack Chain

  1. Initial Access: Unauthenticated attacker sends crafted multipart HTTP requests exploiting PHP memory handling flaws
  2. Execution: Vulnerability in session.Upload_progress or worker state reuse triggers remote code execution
  3. Persistence: Attacker may place files in web root directory for continued access
  4. Actions: Attacker operates under web server account privileges on compromised host

Affected Systems

  • PHP 5 and later versions
  • mod_php environments (highest risk)
  • PHP 8.1 and below (no official patches)
  • Apache web servers using mod_php
  • PHP installations with session.Upload_progress enabled

Vulnerabilities (CVEs)

copy:
CVEProductSeverityDescription
CVE-2026-109618PHPCriticalUnauthenticated RCE via partial request data initialization during memory shortage handling.
CVE-2026-109619PHPCriticalUnauthenticated RCE via persistent internal state after memory deallocation in worker.

Detection Availability

  • Published: Snort/Suricata
  • Platforms: Corelight Zeek, Corelight Suricata, NCSC-NL

Corelight published Zeek and Suricata detection rules; NCSC-NL shared operational intelligence. No YARA or Sigma rules referenced.

Detection Engineering Assessment

Hunting Hypotheses

copy:
HypothesisTelemetryStageFP Risk
Web server processes creating unexpected files in web root directories after receiving multipart requests (T1505.003)File creation events, web server process telemetryPersistenceMedium — legitimate application file uploads to web root
Abnormal multipart HTTP requests targeting session.Upload_progress feature from external sources (T1190)Web server access logs, Suricata/Zeek network logsInitial AccessMedium — legitimate upload progress requests are common
Web server account spawning unexpected child processes or shell interpreters (T1190)Process execution logs, parent-child process telemetryExecutionLow — web server spawning shells is rarely legitimate

Required Log Sources

  • Web server access logs
  • Suricata or Zeek network logs
  • Process execution logs
  • File system audit logs

Control Gaps

  • WAF rules may not detect exploitation via legitimate multipart request structure
  • Network-only detection misses post-exploitation activity on the host
  • Patching latency for distribution-managed PHP packages creates exposure window

Recommendations

Infrastructure Hardening

  • Deploy and tune WAF rules to block suspicious multipart requests before production rollout
  • Verify whether distribution or LTS vendors have shipped patched PHP packages
  • Migrate PHP 8.1 and below to supported versions; source backports are minimal

User Protection

  • Run public PoC or testing code only in isolated environments after manual review
  • Avoid executing scripts from unverified GitHub repositories claiming to mitigate the vulnerability

MITRE ATT&CK Mapping

MITRE ATT&CK Mapping2 techniques
IOCs · 2
.txt.json
Showing defanged values
  • cve
    CVE-2026-109618Unauthenticated RCE via partial request data initialization during memory shortage handling.
  • cve
    CVE-2026-109619Unauthenticated RCE via persistent internal state after memory deallocation in worker.