CVE-2026-33017·Python vulnerability
Langflow is a tool for building and deploying AI-powered agents and workflows. In versions prior to 1.9.0, the POST /api/v1/build_public_tmp/{flow_id}/flow endpoint allows building public flows without requiring authentication. When the optional data parameter is supplied, the endpoint uses attacker-controlled flow data (containing arbitrary Python code in node definitions) instead of the stored flow data from the database. This code is passed to exec() with zero sandboxing, resulting in unauthenticated remote code execution. This is distinct from CVE-2025-3248, which fixed /api/v1/validate/code by adding authentication. The build_public_tmp endpoint is designed to be unauthenticated (for public flows) but incorrectly accepts attacker-supplied flow data containing arbitrary executable code. This issue has been fixed in version 1.9.0.
- Severity
- critical
- Software
- Python
- Fixed in
- 1.8.2
- Published
- 2026-03-20
Affected versions
Until: 1.8.2
Fixed in: 1.8.2
How to fix this CVE
Upgrade Langflow to version 1.9.0 or later immediately. If upgrading is not possible, disable public flow sharing or restrict access to the /api/v1/build_public_tmp endpoint via reverse proxy rules. Audit for signs of compromise.
pip install --upgrade langflow>=1.9.0
# Or via Docker:
docker pull langflowai/langflow:latest
# Verify: langflow --version (should show >= 1.9.0)
# Restrict endpoint if not upgrading:
# In nginx: location ~ /api/v1/build_public_tmp { deny all; }Defensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST /api/v1/build_public_tmp/{flow_id}/flow HTTP/1.1
Content-Type: application/json
The attacker sends a crafted flow definition that includes malicious Python code in component configurations. When the server builds the flow, it executes the embedded code without authentication. The flow_id can be enumerated or guessed if public flows exist.WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
SecRule REQUEST_URI "@rx /api/v1/build_public_tmp" "id:20263301,phase:1,deny,status:403,msg:'CVE-2026-33017 Langflow pre-auth RCE endpoint blocked',severity:CRITICAL"
# Or restrict to authenticated users only via reverse proxyHow to check if you are affected
- Check Langflow version: langflow --version or pip show langflow — vulnerable if < 1.9.0
- Search for exploitation attempts in access logs: grep 'build_public_tmp' /var/log/nginx/access.log
- Check for running Langflow instances: ps aux | grep langflow
- Look for suspicious Python processes spawned by Langflow: pstree -p $(pgrep -f langflow)
- Check for newly created files in Langflow working directory
- Audit public flows: check Langflow UI for flows marked as public
Indicators of compromise
- POST requests to /api/v1/build_public_tmp from external IPs
- Langflow process spawning unexpected child processes (reverse shells, crypto miners)
- New files created in Langflow temp directories or /tmp
- Outbound connections from Langflow process to unknown IPs
- Python subprocess execution triggered by flow builds
FAQ
Is Langflow widely deployed?
Langflow is a popular open-source tool for building AI/LLM workflows and agents. It has grown significantly with the AI/LLM boom and is used by developers, startups, and enterprises for prototyping and deploying AI pipelines.
Can this be exploited without any authentication?
Yes, that is what makes it critical. The build_public_tmp endpoint is accessible without authentication when public flows exist. An attacker only needs network access to the Langflow instance.
What can an attacker do with this vulnerability?
Full remote code execution on the server running Langflow. This typically means: data exfiltration, lateral movement, cryptocurrency mining, ransomware deployment, or establishing persistent backdoor access.
Does disabling public flows mitigate this?
Yes, if no public flows exist, the endpoint has no valid flow_id to target. However, upgrading is still recommended as a defense-in-depth measure.
Is this related to prompt injection?
No. This is a traditional code execution vulnerability in the application layer, not a prompt injection or LLM-specific attack. The flow build process executes Python code from flow definitions, and the endpoint lacks authentication.
Related Python CVEs
References
- https://github.com/advisories/GHSA-rvqx-wpfh-mfx7
- https://github.com/langflow-ai/langflow/commit/73b6612e3ef25fdae0a752d75b0fabd47328d4f0
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-vwmf-pq79-vjvx
- https://github.com/langflow-ai/langflow/releases/tag/1.8.2
- https://medium.com/@aviral23/cve-2026-33017-how-i-found-an-unauthenticated-rce-in-langflow-by-reading-the-code-they-already-dc96cdce5896
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-33017. Free for 1 server.
Get started free