Langflow 1.3.0 Remote Code Execution Vulnerability
Langflow 1.3.0 contains a remote code execution vulnerability (CVE-2026-0770) due to untrusted input in the exec_globals parameter at the validate endpoint, allowing remote attackers to execute arbitrary code as root without authentication, as demonstrated by a public exploit.
What's new
- l1 new product Jul 21, 15:00 via cisa-kev
A remote code execution (RCE) vulnerability exists in Langflow version 1.3.0, tracked as CVE-2026-0770. This flaw stems from the inclusion of functionality from an untrusted control sphere within the exec_globals parameter located at the /api/v1/validate/code endpoint. The vulnerability allows unauthenticated remote attackers to execute arbitrary code with root privileges on affected systems. Exploit-DB has published a working exploit (EDB-52597) for this vulnerability, which exacerbates the risk for organizations using unpatched instances of Langflow. Version 1.2.0 is also affected.
Attack Chain
- The attacker sends an HTTP GET request to
/api/v1/auto_loginto obtain an access token. - The server responds with a JSON object containing an
access_token. - The attacker crafts a malicious HTTP POST request to
/api/v1/validate/codeendpoint. - The attacker sets the
Authorizationheader with aBearare {access_token}string. - The request body contains a JSON object with a
codeparameter. Thiscodeparameter contains a Python script that leverages thesubprocessmodule to execute arbitrary commands. - The Python script within the
codeparameter utilizes__import__('subprocess').run('%s', shell=True, capture_output=True, text=True)to execute the attacker-controlled command. - The server executes the attacker-supplied command with root privileges.
- The output of the command is returned to the attacker via the API response, confirming code execution.
Impact
Successful exploitation of this vulnerability allows an unauthenticated attacker to execute arbitrary code with root privileges on the Langflow server. This can lead to complete system compromise, data theft, denial of service, or further lateral movement within the network. Given the nature of Langflow as a low-code framework designed for building flows with Large Language Models, such a compromise could lead to the exposure of sensitive LLM configurations, API keys, and data used within these flows.
Recommendation
- Apply the patch or upgrade to a secure version of Langflow to remediate CVE-2026-0770.
- Deploy the Sigma rule
Detect Langflow RCE via Validate Endpointto detect exploitation attempts in web server logs. - Monitor network traffic for unusual POST requests to the
/api/v1/validate/codeendpoint containing shell metacharacters in thecodeparameter.
Detection coverage 1
Detect Langflow RCE via Validate Endpoint
criticalDetects CVE-2026-0770 exploitation — HTTP POST to /api/v1/validate/code endpoint with shell metacharacters in the code parameter indicating command injection attempt.
Detection queries are available on the platform. Get full rules →