CVE-2026-0770: Langflow affected by Remote Code Execution via validate_code() exec()
Langflow through 1.7.3 runs attacker-supplied Python in its code-validation path. A remote attacker can run arbitrary code, in the PoC without logging in, and the ZDI advisory says it runs as root. CISA lists it as exploited. The package data lists no patched version, so limit exposure now and watch the Langflow project for a fix.
Published Jan 23, 2026 · Updated Feb 19, 2026 · Analysis Oct 25, 2026
What an attacker can do
Langflow validates custom component code by running it. The public proof of concept points at validate_code() in src/lfx/src/lfx/custom/validate.py. That function calls exec() on user-supplied function definitions with no sandbox. Python evaluates default-argument expressions when it defines a function, so code placed in a default argument runs during validation, before any check can reject it. ZDI describes the same flaw as the handling of the exec_globals parameter passed to the validate endpoint.
The PoC lists these entry points: POST /api/v1/validate/code, POST /api/v1/custom_component, POST /api/v1/custom_component/update, POST /api/v1/webhook/{flow_id} and POST /api/v1/build_public_tmp/{flow_id}/flow. The last two need no authentication. For the others, the PoC says login can be bypassed when AUTO_LOGIN=true, which it calls the default configuration. ZDI says no authentication is required.
The attacker needs network access to the Langflow port. They get code execution on the host in the context of the Langflow process, which ZDI says is root. That exposes API keys for LLM providers, vector stores and databases kept in flows and environment, and gives a base for moving inward. EPSS is 0.6256, which is high.
Who is affected
The pip package langflow at version 1.7.3 and earlier. ZDI reported the flaw in July 2025, and the PoC author tested the langflowai/langflow:latest Docker image on 7 February 2026, so later builds may still be affected until the vendor ships a fix. Instances reachable from untrusted networks, with AUTO_LOGIN=true or with public flows, are the most exposed.
pip show langflowFor Docker, check the image tag and run the same command inside the container.
langflow
- Ecosystem
- PyPI
- Affected
- <= 1.7.3
- Fixed in
- No patched version yet
- Check
pip show langflow
How to fix it
No patched version is listed in the advisory data. ZDI's page also gives no fixed version, and shows the vendor did not answer its follow-ups in the disclosure timeline. Check the Langflow releases and GitHub advisory for a fix before relying on this.
Mitigation from ZDI: restrict interaction with the product. In practice, that means taking Langflow off the public internet, putting it behind a VPN or an authenticating proxy, and blocking the endpoints listed above at the proxy.
The PoC page also points to turning AUTO_LOGIN off and not exposing public flows that hold code components. That page does not itself confirm those stop the attack, so verify them.
CISA's required action: apply vendor mitigations per BOD 26-04 and the forensics triage requirements, or stop using the product if no mitigation exists. The due date was 2026-07-24 and binds US federal agencies.
CISA required action: Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
How to tell if you were hit
Check web or proxy logs for POSTs to /api/v1/validate/code, /api/v1/custom_component, /api/v1/custom_component/update, /api/v1/webhook/ and /api/v1/build_public_tmp/ from unknown addresses. Look in request bodies for function definitions whose default arguments call os, subprocess, __import__ or eval.
On the host, look for child processes of the Langflow server such as sh, curl, wget or python -c, for new files in /tmp and the working directory, new cron jobs or SSH keys, and outbound connections to unknown hosts. Because the process may run as root, treat a hit as full host compromise: rotate every API key and secret the instance could read.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Langflow exec_globals Inclusion of Functionality from Untrusted Control Sphere Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Langflow. Authentication is not required to exploit this vulnerability.
The specific flaw exists within the handling of the exec_globals parameter provided to the validate endpoint. The issue results from the inclusion of a resource from an untrusted control sphere. An attacker can leverage this vulnerability to execute code in the context of root. Was ZDI-CAN-27325.
Credited to affix.
Questions
- Is CVE-2026-0770 exploited in the wild?
Yes. CISA added it to the Known Exploited Vulnerabilities catalog on 2026-07-21. A public proof of concept exists on GitHub.
- Is there a patched Langflow version?
The advisory data lists none. ZDI's page gives no fixed version either. Versions up to 1.7.3 are marked vulnerable, so watch the Langflow releases and advisory for a fix.
- Does the attacker need to log in?
ZDI says authentication is not required. The PoC lists two endpoints that need no login, and says the others can be reached when
AUTO_LOGIN=true.- Which endpoints are involved?
The PoC names
/api/v1/validate/code,/api/v1/custom_component,/api/v1/custom_component/update,/api/v1/webhook/{flow_id}and/api/v1/build_public_tmp/{flow_id}/flow.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Langflow vulnerabilities
All Langflow entriesCVE-2026-105697
Langflow: OS command injection (RCE) via arbitrary command in MCP stdio server configuration
critical9.9Oct 7, 2026CVE-2026-105698
Langflow : Cross-user flow access and vertex execution via deprecated /api/v1/build/{flow_id}/vertices endpoints
medium5.4Oct 7, 2026CVE-2026-105699
Langflow has Authenticated Cross-Project File Disclosure via Unscoped MCP Resource Handlers
high7.1Oct 7, 2026CVE-2026-105741
Langflow: IP Spoofing Bypass via `X-Forwarded-For` Allowing Remote Configuration Write
high7.1Oct 7, 2026CVE-2026-10561
Langflow: PythonREPLComponent executes unsandboxed Python code, enabling authenticated RCE and privilege escalation
critical9.9Oct 6, 2026GHSA-j8f7-x8jm-wmm4
Langflow: SSRF in URL-taking components (protection disabled by default / warn-only, not applied to RSS, SearXNG, Web Search, Home Assistant, Glean, Docling)
medium6.3Oct 6, 2026
