Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

Langflow validate endpoint exec_globals Remote Code Execution

IdentifiersCVE-2026-0770CWE-829· Inclusion of Functionality from…

CVE-2026-0770 is a critical unauthenticated remote code execution vulnerability in Langflow. The flaw exists in the validate endpoint’s handling of the exec_globals parameter, where untrusted attacker-controlled input is incorporated into code execution logic. Multiple provided sources describe the issue as RCE via Langflow’s validate_code() use of exec(), and the root cause as inclusion of functionality/resources from an untrusted control sphere. Successful exploitation allows a remote attacker to supply crafted input to the validate endpoint and cause arbitrary Python code execution on the target system. The available reporting states that exploitation occurs without authentication and that code executes in the context of root on affected installations.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows unauthenticated remote attackers to execute arbitrary code on affected Langflow instances. The provided content states execution can occur in the context of root, which gives an attacker full control of the host, including installing malware, modifying application data and configuration, stealing secrets, pivoting to adjacent systems, and disrupting service availability.

Mitigation

If you can’t patch tonight, do this now.

Because the provided content indicates no patch was available at disclosure, the primary mitigation is to restrict interaction with the product, especially the vulnerable validate endpoint. Place Langflow behind network ACLs, VPN, reverse proxy allowlists, or other access controls; do not expose the service directly to the public internet; require authentication in front of the application if operationally possible; and block untrusted input from reaching exec_globals or validate_code execution paths. Additional compensating controls include isolating the service, running it with least privilege instead of root where possible, and monitoring for exploitation attempts against the validate endpoint.

Remediation

Patch, then assume compromise.

No vendor patch was available in the provided content at the time of disclosure. If an official Langflow fix is now available, apply the vendor patch or upgrade immediately to the fixed release. In the absence of a patch, remove or harden the vulnerable validate_code()/validate endpoint behavior so that attacker-controlled exec_globals input cannot reach exec() or equivalent dynamic execution paths, following official vendor guidance where available.
PUBLIC EXPLOITS

Exploits

5 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 5 / 7 TOTALView more in app
CVE-2026-0770MaturityPoCVerified exploit

This repository contains a single standalone Python exploit script, CVE-2026-0770.py, targeting Langflow versions prior to 1.3.0. The script is a real exploit rather than a detector: it obtains an API bearer token either by posting credentials to /api/v1/login or, if available, by abusing /api/v1/auto_login, then sends attacker-controlled Python source to /api/v1/validate/code. The payload abuses unsafe code execution in Langflow's validate_code functionality by embedding a subprocess.run() call inside a function default argument, causing arbitrary shell command execution on the server. Output is captured and surfaced back to the attacker by intentionally raising an exception containing stdout/stderr, which the script then prints from the returned JSON error structure. Repository structure is minimal: one Python file using argparse for CLI handling, httpx for HTTP requests, asyncio for async execution, and json for response parsing. Main capability is remote command execution against exposed Langflow instances on port 7860, with support for both unauthenticated exploitation via auto-login and authenticated exploitation with supplied credentials.

diamorphine666Disclosed May 23, 2026pythonwebnetwork
CVE-2026-0770MaturityPoCVerified exploit

Small standalone exploit repository containing one Python PoC script (exp_v3.py), a README, and a license. The script targets CVE-2026-0770 in Langflow by sending attacker-controlled Python code to the /api/v1/validate/code endpoint. It is not merely a detector: it builds a payload that invokes subprocess.run(shell=True) with an operator-supplied command, captures stdout/stderr, and forces the output into an exception string delimited by CMD_OUTPUT_START/CMD_OUTPUT_END so the client can parse it from the HTTP response. The exploit supports an optional JWT token via -k/--token; otherwise it first attempts authentication to /api/v1/login using hardcoded default credentials langflow/langflow and, if successful, adds a Bearer token to the exploit request. CLI options allow specifying the target URL, direct command string, or reading the command from a local file. Repository structure is minimal and purpose-built for exploitation rather than scanning or framework integration. Overall capability is authenticated-or-default-credential-assisted remote command execution against vulnerable Langflow instances, with returned command output displayed to the operator.

Ez4rd1x1Disclosed May 15, 2026pythonmarkdownwebnetwork
CVE-2026-0770MaturityPoCFrameworknucleiVerified exploit

This repository contains a compact exploit set for CVE-2026-0770 affecting Langflow. There are three files: a standalone Python PoC, a Nuclei template, and a README. Because the repository includes a Nuclei template, it belongs to a framework; the main exploit logic is concentrated in CVE-2026-0770.yaml, with the Python script providing equivalent standalone exploitation. The exploit targets Langflow's validation API, specifically POST /api/v1/validate/code. The core technique is to send attacker-controlled Python source in the code field, relying on unsafe exec()-based evaluation. The payload abuses Python default-argument evaluation so that subprocess.run() executes immediately when the function definition is processed. Output is forced into an exception string prefixed with OUTPUT:, allowing the attacker to recover stdout/stderr from the API response. The Nuclei template performs two requests: first POST /api/v1/login with username=langflow and password=langflow to obtain an access token, then POST /api/v1/validate/code with a Bearer token and a hardcoded payload running cat /etc/passwd. Matchers confirm exploitation by checking for HTTP 200, the marker OUTPUT:, and passwd content such as root:x:0:0:root. This makes the template both an exploit and a verification artifact, not merely a detector. The Python PoC is more flexible: it accepts a target URL, optional JWT token, and arbitrary command string (default id && whoami). If no token is provided, it attempts the same default-credential login flow. Successful exploitation yields arbitrary command execution on the remote Langflow host, potentially with high privileges depending on how Langflow is deployed.

0xBlackashDisclosed Apr 3, 2026pythonyamlnetworkweb
CVE-2026-0770MaturityPoCFrameworknuclei (template included)Verified exploit

Repository purpose: Proof-of-concept exploit for CVE-2026-0770 affecting Langflow, achieving remote code execution by sending attacker-controlled Python to the Langflow validation endpoint that is executed via exec() (per README/template). Structure (5 files): - CVE-2026-0770.py: Main Python exploit tool. Implements (1) optional auto-login to /api/v1/login using default creds langflow/langflow to obtain a JWT access_token, then (2) POSTs a crafted Python payload to /api/v1/validate/code. The payload triggers command execution at function-definition time using a default argument that calls subprocess.run(command, shell=True, capture_output=True, text=True). Output is embedded into an Exception message ("OUTPUT:\n...") via a generator throw(), enabling the client to parse stdout/stderr from the server response. Supports single-command mode (-c) and an interactive shell mode (not fully shown due to truncation), plus verbose logging and optional user-supplied token (-k). Also writes local command history to ~/.langflow_history. - CVE-2026-0770.yaml: Nuclei template (detection/verification) that performs two HTTP requests: login to extract access_token, then exploit validate/code with a fixed command (cat /etc/passwd). Matchers look for "root:x:0:0:root" and "OUTPUT:" with HTTP 200 to confirm RCE. - README.md: Usage instructions, affected endpoint (/api/v1/validate/code), notes about AUTO_LOGIN=true default behavior, and mitigation guidance. - LICENSE: MIT. - .gitignore: Standard Python ignores. Exploit capabilities: network-based RCE against Langflow instances exposing the API; can operate with default credentials (auto-login) or a provided JWT; returns command output; provides interactive command execution convenience. No persistence or lateral movement logic is present beyond arbitrary command execution.

0xgh057r3c0nDisclosed Feb 24, 2026pythonyamlnetwork (HTTP API)
CVE-2026-0770-PoCMaturityPoCVerified exploit

Repository contains a PoC exploit for alleged CVE-2026-0770 affecting Langflow. Structure is minimal: README.md (vuln description, affected endpoints, and technique) and poc.py (working exploit script). poc.py is a Python network exploit using the requests library. It targets a Langflow HTTP API and attempts to obtain a JWT by POSTing to /api/v1/login with default credentials (langflow/langflow) when the user does not supply a token, relying on the README’s claim that AUTO_LOGIN=true by default. It then POSTs JSON to /api/v1/validate/code with a crafted Python payload. Core capability: remote code execution. The payload leverages the fact that the vulnerable server-side validate_code() executes submitted function definitions via exec(). The PoC embeds command execution inside a function default argument so it runs at definition time. To exfiltrate output, it captures stdout/stderr from subprocess.run(..., shell=True, capture_output=True, text=True) and raises an exception containing the output using a generator expression’s .throw(), which is an expression and can be used inside the default argument. The script then parses the API’s returned error structure (response.function.errors) to extract the "OUTPUT:" marker and print command output. README.md also lists additional potentially vulnerable endpoints (/api/v1/custom_component, /api/v1/custom_component/update, /api/v1/webhook/{flow_id}, /api/v1/build_public_tmp/{flow_id}/flow) and other related CVEs, but the provided code only exploits /api/v1/validate/code.

affixDisclosed Feb 7, 2026pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
LangflowLangflowapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware1

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity12

Community discussion across Reddit, Mastodon, and other social sources.