Langflow CVE-2026-0770 Enables Unauthenticated RCE Through Code Validation Endpoint

Summary
CVE-2026-0770 lets unauthenticated attackers execute code through Langflow’s /api/v1/validate/code endpoint because validation used Python exec(). The article reports active exploitation and advises upgrading, investigating exposed instances, and rotating credentials.
Key points
- The article reports that an unauthenticated POST to Langflow’s /api/v1/validate/code endpoint can trigger remote code execution on vulnerable instances.
- The root cause is Python exec() running user-supplied function definitions during validation; default-argument expressions and decorators can execute before a function is called.
- Langflow versions 0.0.31 through 1.7.3 are identified as affected; the article says the fix replaces execution with compile-only validation in the release-1.10.1 branch.
- The article reports exploitation observed from June 27, 2026, with more than 220 attempts from 64 source IP addresses before CISA added the CVE to its KEV Catalog on July 21.
- Reported activity includes system reconnaissance, attempts to obtain cloud credentials and environment variables, and downloading second-stage payloads. No single threat actor is publicly attributed.
- The article demonstrates the flaw in a controlled lab and describes how crafted function definitions can execute operating-system commands and read files.
- Recommended response includes patching, investigating exposed instances and historical requests, rotating potentially exposed credentials, and restricting network access.
Article Details
- Attack Vectors
- Unauthenticated POST requests to Langflow's /api/v1/validate/code endpoint exploit CVE-2026-0770 in versions 0.0.31 through 1.7.3.
- Crafted Python function definitions trigger execution during validation because default-argument expressions and decorators are evaluated when the function is defined and the vulnerable code passes it to exec().
- The resulting code execution can run Python and operating-system commands with the privileges of the Langflow process; the article reports installations running as root.
- Reported exploitation activity included reconnaissance commands such as id, whoami, and env; attempts to access AWS credentials, environment variables, and container metadata; and downloads of second-stage scripts.
- The article describes post-exploitation actions including installing cryptocurrency miners, adding SSH keys or cron jobs where permitted, and scanning internal cloud networks.
- Defensive Notes
- Upgrade affected Langflow deployments to a fixed release; the article identifies the release-1.10.1 branch and later as fixed.
- Treat internet-facing, unpatched deployments as potentially compromised. Investigate historical requests to /api/v1/validate/code and review application, proxy, container, and cloud audit logs.
- Rotate potentially exposed cloud credentials, API keys, database credentials, and Kubernetes service-account tokens; review cloud accounts for unauthorized activity.
- Rebuild confirmed-compromised containers or virtual machines from a known-good image and backup, and check for persistence before restoring.
- Restrict public network access, enforce authentication, and block or rate-limit POST requests to the validation endpoint if it is not required.
- Run Langflow as a non-root user, minimize container capabilities and IAM permissions, and restrict unnecessary access to cloud metadata services.
- Monitor for unexpected process execution, metadata access, file reads, and outbound connections; the article recommends runtime tools such as Falco or Sysdig.
MITRE ATT&CK
T1046 · Network Service DiscoveryThe article describes using a compromised Langflow host to scan internal cloud networks.T1053.003 · CronAdding cron jobs is listed as a persistence method, where the container runtime permits it.T1059.004 · Unix ShellThe article describes executing operating-system commands, including id checks and a bash reverse shell, through the vulnerable endpoint; the reverse shell was demonstrated in a lab.T1059.006 · PythonThe crafted validation input contains Python function definitions that execute attacker-controlled expressions through Langflow's vulnerable exec() call.T1082 · System Information DiscoveryReported payloads used id, whoami, and env for command-execution checks and system reconnaissance.T1098.004 · SSH Authorized KeysAdding SSH keys is listed as a persistence method, where the container runtime permits it.T1105 · Ingress Tool TransferThe article reports attackers downloading second-stage scripts from remote URLs after exploiting Langflow.T1190 · Exploit Public-Facing ApplicationAttackers exploit CVE-2026-0770 through the unauthenticated /api/v1/validate/code endpoint on internet-facing Langflow deployments.T1496 · Resource HijackingThe article describes installing cryptocurrency miners as post-exploitation behavior.T1552.001 · Credentials In FilesReported exploitation sought AWS credentials in ~/.aws/credentials and ~/.aws/config.T1552.005 · Cloud Instance Metadata APIThe article reports attempts to query the cloud instance metadata service to obtain temporary IAM credentials.
CVE
CVE-2025-3248The activity overlaps with the broader pattern of AI/ML platform exploitation that has accelerated since 2025, including related Langflow KEV entries CVE-2025-3248, CVE-2026-33017, and CVE-2026-55255.CVE-2026-0770CVE-2026-0770 is a critical unauthenticated remote code execution (RCE) vulnerability affecting Langflow's /api/v1/validate/code endpoint.CVE-2026-33017The activity overlaps with the broader pattern of AI/ML platform exploitation that has accelerated since 2025, including related Langflow KEV entries CVE-2025-3248, CVE-2026-33017, and CVE-2026-55255.CVE-2026-55255The activity overlaps with the broader pattern of AI/ML platform exploitation that has accelerated since 2025, including related Langflow KEV entries CVE-2025-3248, CVE-2026-33017, and CVE-2026-55255.
Vendors
Amazon Web ServicesIn many production environments, Langflow is deployed within Docker containers or Kubernetes clusters and integrated with cloud platforms such as AWS, Azure, or Google Cloud.Google CloudIn many production environments, Langflow is deployed within Docker containers or Kubernetes clusters and integrated with cloud platforms such as AWS, Azure, or Google Cloud.Microsoft AzureIn many production environments, Langflow is deployed within Docker containers or Kubernetes clusters and integrated with cloud platforms such as AWS, Azure, or Google Cloud.
Products
DockerIn many production environments, Langflow is deployed within Docker containers or Kubernetes clusters and integrated with cloud platforms such as AWS, Azure, or Google Cloud.Kubernetesand API keys, access container metadata, deploy malware, establish persistence, and pivot into cloud or Kubernetes environments.LangflowCVE-2026-0770 is a critical unauthenticated remote code execution (RCE) vulnerability affecting Langflow's /api/v1/validate/code endpoint.
Tools
CVE-2026-0770-PoCThe same vulnerability was confirmed using the independently published public PoC from affix/CVE-2026-0770-PoC (https://github.com/affix/CVE-2026-0770-PoC).FalcoDeploy Falco, Sysdig, or an equivalent tool to alert on unexpected process execution, metadata access, or file reads inside the Langflow container.sysdigDeploy Falco, Sysdig, or an equivalent tool to alert on unexpected process execution, metadata access, or file reads inside the Langflow container.
