All vulnerabilities
CVE-2026-7700GHSA-9fpm-3445-2vx4PYSEC-2026-4232

Langflow: Prompt injection in Langflow Smart Transform can lead to code execution

langflow-ai langflowpipApplications & CMS
CVSS
8.8High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.31%Chance of exploitation activity in the next 30 days, higher than 23% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.10.3Fixed versionGitHub
Published3 May 2026Updated 15 Oct 2026CVE List

What fixes it

  • 1.10.3langflow, pipGitHub
  • 1.10.3langflow, PyPIOSVpip install "langflow>=1.10.3"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Summary

Langflow versions 1.3.0 through 1.10.2 contain a code-injection vulnerability in the Smart Transform (LambdaFilterComponent) component.

Smart Transform places flow-author instructions and a preview of its input data into a prompt asking an LLM to generate a Python lambda. It then extracts a one-line lambda from the model response, applies only syntactic format checks, evaluates it with Python's full builtins, and invokes the resulting function inside the Langflow process.

A malicious flow author can exploit this directly through the Instructions field. In deployments where an exposed flow passes attacker-controlled content into Smart Transform, an attacker may also exploit it indirectly through prompt injection, subject to the configured model following the injected instruction.

Vulnerability details

Vulnerable Code Location: src/lfx/src/lfx/components/llm_operations/lambda_filter.py (line 242 in v1.10.2)

def _validate_lambda(self, lambda_text: str) -> bool:
    """Validate the provided lambda function text."""
    return lambda_text.strip().startswith("lambda") and ":" in lambda_text

# ...
return eval(lambda_text)  # noqa: S307

For example, an attacker can attempt to make the model return:

lambda x: __import__("os").system("id")

This expression satisfies the vulnerable format checks. eval() creates the lambda with access to Python's default builtins, and the subsequent fn(data) invocation (in _execute_lambda) executes the command.

Successful exploitation allows code execution with the privileges of the Langflow service process. This can expose or modify credentials, files, application data, and network resources accessible to that process, and may affect other tenants in shared deployments.

PoC

https://github.com/user-attachments/assets/13c48fe1-7225-4e0d-9687-2d2df1e87f0e

Fix

The reported path was addressed by validating the generated code's AST and evaluating it with a restricted builtins mapping.

The mainline fix is in PR #13530 (1641b28f) and shipped in Langflow 1.11.0. The 1.10.3 backport is in PR #14071 (94859df3). Users should upgrade to Langflow 1.10.3 or later.

Workarounds

Until an upgrade is possible:

  • Remove Smart Transform from runnable flows.
  • Restrict flow creation, editing, and execution to trusted users.
  • Do not route untrusted or externally controlled data through Smart Transform.
  • Limit the Langflow process's filesystem, network, and credential access.

Credit

  • Peyton Kennedy (p80n-sec) of Endor Labs — reporter (original finder)
  • SZXSec — reporter (duplicate report)
  • cyjhhh — reporter (duplicate report)
  • 0gur1 — reporter (duplicate report)
  • ajm4n — reporter (duplicate report, Finding 1 of a multi-finding submission)
  • andifilhohub — analyst
  • Jordan Frazier (jordanrfrazier) — remediation developer

Text from GitHub Advisory Database

Affected versions 55

  • langflow, pip>= 1.3.0, < 1.10.3GitHub
  • langflowaffected: 1.10.0CVE List
  • langflowaffected: 1.10.1CVE List
  • langflowaffected: 1.10.2CVE List
  • langflow, PyPIfrom 1.3.0, fixed in 1.10.3OSV
  • langflow, PyPI1.10.0OSV
  • langflow, PyPI1.10.0rc0OSV
  • langflow, PyPI1.10.1OSV
  • langflow, PyPI1.10.1rc0OSV
  • langflow, PyPI1.10.1rc3OSV
  • langflow, PyPI1.10.2OSV
  • langflow, PyPI1.10.2rc4OSV
  • langflow, PyPI1.10.3rc0OSV
  • langflow, PyPI1.3.0OSV
  • langflow, PyPI1.3.1OSV
  • langflow, PyPI1.3.2OSV
  • langflow, PyPI1.3.3OSV
  • langflow, PyPI1.3.4OSV
  • langflow, PyPI1.4.0OSV
  • langflow, PyPI1.4.1OSV
  • langflow, PyPI1.4.2OSV
  • langflow, PyPI1.4.3OSV
  • langflow, PyPI1.5.0OSV
  • langflow, PyPI1.5.0.post1OSV
  • langflow, PyPI1.5.0.post2OSV
  • langflow, PyPI1.5.1OSV
  • langflow, PyPI1.6.0OSV
  • langflow, PyPI1.6.1OSV
  • langflow, PyPI1.6.2OSV
  • langflow, PyPI1.6.3OSV
  • langflow, PyPI1.6.4OSV
  • langflow, PyPI1.6.5OSV
  • langflow, PyPI1.6.6OSV
  • langflow, PyPI1.6.7OSV
  • langflow, PyPI1.6.8OSV
  • langflow, PyPI1.6.9OSV
  • langflow, PyPI1.7.0OSV
  • langflow, PyPI1.7.1OSV
  • langflow, PyPI1.7.2OSV
  • langflow, PyPI1.7.3OSV
  • langflow, PyPI1.8.0OSV
  • langflow, PyPI1.8.0rc0OSV
  • langflow, PyPI1.8.0rc1OSV
  • langflow, PyPI1.8.0rc2OSV
  • langflow, PyPI1.8.0rc3OSV
  • langflow, PyPI1.8.0rc4OSV
  • langflow, PyPI1.8.0rc5OSV
  • langflow, PyPI1.8.0rc6OSV
  • langflow, PyPI1.8.1OSV
  • langflow, PyPI1.8.2OSV
  • langflow, PyPI1.8.3OSV
  • langflow, PyPI1.8.3rc0OSV
  • langflow, PyPI1.8.4OSV
  • langflow, PyPI1.9.0OSV
  • langflow, PyPI1.9.1OSV

References 13