Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
php2shell-CVE-2026-109618-CVE-2026-109619-PoC — Proof-of-Concept (PoC) exploit for php2shell (CVE-2026-109618 / CVE-2026-109619), demonstrating remote code execution in vulnerable PHP environments. For security research and educational purposes only. | Kitploit
Tools/GitHubGitHub/eness/php2shell-cve-2026-109618-cve-2026-109619-poc
Memory ForensicsVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRemote Access Tool
GitHub

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
eness/php2shell-cve-2026-109618-cve-2026-109619-poc

php2shell-CVE-2026-109618-CVE-2026-109619-PoC

Proof-of-Concept (PoC) exploit for php2shell (CVE-2026-109618 / CVE-2026-109619), demonstrating remote code execution in vulnerable PHP environments. For security research and educational purposes only.

View Repository
780171414h 48m agoNot yet reviewed

php2shell — CVE-2026-109618 / CVE-2026-109619

php2shell — CVE-2026-109618 / CVE-2026-109619

Critical Advisory (CVSS v4.0: 9.2 - Critical): On October 20, details of two pre-auth Remote Code Execution (RCE) flaws in the PHP core leaked online ahead of coordinated disclosure. Exploitation allows arbitrary command execution straight from the web server.


Table of Contents

  • Overview
    • Root Cause
    • Verification & Targets
  • Affected PHP Versions
  • Threat Landscape & Detection Guidance
    • Behavioral Indicators & Suspicious Child Processes
    • Monitoring Recommendation
  • Action Items for Organizations
  • Proof of Concept (PoC)
    • Exploit Architecture & Stages
    • Target Requirements
    • Usage & Parameters
    • Profiles & Offsets
  • Mitigation & Source Patching
    • 1. Configuration Mitigation (Immediate Stopgap)
    • 2. Automated Quick-Fix Script
    • 3. Source Code Patch (session-upload-progress-counters.patch)
    • 4. Cloudflare WAF Custom Rules
    • 5. FrankenPHP Caddyfile Configuration
    • 6. Lighttpd Configuration
    • 7. Apache Mitigation (ModSecurity & .htaccess)
  • Disclaimer

Overview

php2shell refers to two critical vulnerabilities (CVE-2026-109618 & CVE-2026-109619) affecting core PHP functionality. The primary demonstrated vector is a heap use-after-free (UAF) in the PHP core session upload progress mechanism leading to arbitrary code execution (zend_call_function / system()).

  • Severity: Critical (CVSS v4.0: 9.2)
  • Impacted Versions: Reports indicate PHP versions 5, 6, 7, and 8 may be affected. Fixes are primarily expected for currently supported PHP 8 branches, leaving end-of-life (EOL) versions (PHP 5.x, 7.x, 8.0, 8.1) exposed without official vendor patches.
  • Industry Tracking: Confirmed by security researchers (watchTowr reproduced CVE-2026-109618; monitoring by Huntress and Florian Roth / process-watcher).

Root Cause

PHP's upload progress handler (php_session_rfc1867_callback in ext/session/session.c) stores two raw zval * bucket pointers (post_bytes_processed and current_file_bytes_processed) directly in live HashTable structures.

During request processing:

  1. Trigger: A standard multipart POST request activates progress tracking with default configuration values (session.upload_progress.enabled = 1).
  2. Free: A progress update cycle re-reads session data. The function zend_hash_update() destroys the previous data tree using the destructor zval_ptr_dtor, freeing the memory block.
  3. Reclaim: The freed bucket memory is reclaimed. The dangling pointer is redirected to crafted zend_fcall_info and zend_internal_function structures.
  4. Execution: PHP calls zend_call_function(), resulting in arbitrary system command execution.

Verification & Targets

  • Confirmed on standard php-src builds (including versions 8.4.4 and 8.2.34).
  • Uses symbol offsets (--syms) between zval_ptr_dtor and zend_call_function to adapt to distribution-specific binary layouts (e.g., Debian Bookworm, Ubuntu Noble, Ubuntu Jammy).

Affected PHP Versions

The following table summarizes the PHP versions affected by CVE-2026-109618 and CVE-2026-109619, along with their support and patch statuses:

PHP BranchStatusAffected VersionsFixed / Secure VersionNotes
PHP 8.5Supported (Active)< 8.5.128.5.12Emergency security release published
PHP 8.4Supported (Active)< 8.4.278.4.27Emergency security release published
PHP 8.3Supported (Active)< 8.3.368.3.36Emergency security release published
PHP 8.2Supported (Security Only)< 8.2.358.2.35Emergency security release published
PHP 8.1End of Life (EOL)All 8.1.x versionsNo Official Patch (EOL)Set session.upload_progress.enabled = Off or use ELS/distro backports
PHP 8.0End of Life (EOL)All 8.0.x versionsNo Official Patch (EOL)Official support ended; configuration mitigation is mandatory
PHP 7.xEnd of Life (EOL)All 7.0 - 7.4 versionsNo Official Patch (EOL)Core ext/session logic vulnerable; urgent mitigation or upgrade required
PHP 5.xEnd of Life (EOL)5.4.0+ (with RFC1867 progress tracking)No Official Patch (EOL)Official support ended; isolate host or disable upload progress

[!WARNING] PHP 8.1 and older End-of-Life (EOL) versions do not receive official security patches from the PHP Foundation. For these environments, immediately apply session.upload_progress.enabled = Off or rebuild PHP from source using the provided C source patch.


Threat Landscape & Detection Guidance

Exploitation of php2shell typically manifests as anomalous child processes spawned directly by PHP worker processes (php-fpm, php-cgi, php-cgi.exe, httpd, apache2).

Behavioral Indicators & Suspicious Child Processes

Monitor and alert on PHP worker processes executing:

  • Interactive Shells: /bin/sh, /bin/bash, cmd.exe, powershell.exe
  • Script Interpreters: python, perl
  • Network / Transfer Utilities: curl, wget, nc, certutil.exe
  • Common Reverse Shell Patterns: /dev/tcp/, fsockopen, mkfifo
  • Immediate Reconnaissance Commands: whoami, id, uname -a, ipconfig

Monitoring Recommendation

For Linux-based web environments without an endpoint detection agent, tools like Florian Roth's free process-watcher can be run in observe mode to flag unusual child process spawning in real time.


Action Items for Organizations

  1. Inventory All PHP Environments:
    • Public-facing web servers running applications like WordPress, Drupal, Joomla, or Magento.
    • Internal appliances, hosting panels (cPanel, Plesk), and bundled standalone binaries (php.exe, php-cgi.exe).
  2. Prepare for Patch Windows:
    • Official emergency patches from PHP and downstream Linux distributions are scheduled for release around Wednesday, October 21 at 14:00 UTC (10:00 AM ET).
    • Apply vendor updates immediately once released.
  3. Isolate End-of-Life (EOL) Installations:
    • Environments running unsupported versions (PHP 5.x, 7.x, 8.0, 8.1) may not receive official upstream backports.
    • Restrict access via VPN, apply strict WAF rules, or disable public internet exposure.
  4. Incident Response & Investigation:
    • If suspicious child processes or unexpected files are detected, isolate the host and preserve web server/PHP logs.
    • Inspect web roots and temporary directories (/tmp, /var/tmp) for dropped webshells or transient execution artifacts.

Proof of Concept (PoC)

Download Tool