CVE-2026-7700: Langflow Prompt Injection Vulnerability

HIGH
Advisory Identifier: GHSA-9fpm-3445-2vx4
CVSS 8.8
CWE-94
Published
Advisory Summary

CVE-2026-7700 is a HIGH (CVSS 8.8) prompt injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Langflow libraries in the PyPI ecosystem. The issue involves prompt injection in langflow smart transform can lead to code execution. Remediation is available by upgrading affected packages to version 1.10.3.

CVE-2026-7700 at a Glance

CVE Identifier CVE-2026-7700
GHSA Identifier GHSA-9fpm-3445-2vx4
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Langflow
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-7700

To remediate this vulnerability, upgrade all affected Langflow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

langflow fixed: 1.10.3
pip install langflow>=1.10.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show langflow

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-7700, inspect your installed packages using pip:

pip show langflow

Analyze the terminal output to locate any version of Langflow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10.3), your application is affected.

Note: The pip show langflow command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Langflow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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) ```python 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](https://github.com/p80n-sec)) of Endor Labs** — reporter (original finder) - **[SZXSec](https://github.com/SZXSec)** — reporter (duplicate report) - **[cyjhhh](https://github.com/cyjhhh)** — reporter (duplicate report) - **[0gur1](https://github.com/0gur1)** — reporter (duplicate report) - **[ajm4n](https://github.com/ajm4n)** — reporter (duplicate report, Finding 1 of a multi-finding submission) - **[andifilhohub](https://github.com/andifilhohub)** — analyst - **Jordan Frazier ([jordanrfrazier](https://github.com/jordanrfrazier))** — remediation developer

CVE-2026-7700 Affected Langflow Versions

1 component(s)
Fixed Versions:
1.10.3
Product / Package Ecosystem Affected Versions Fixed Version
langflow
PyPI
≥ 1.3.0
< 1.10.3
1.10.3

References

Frequently Asked Questions

What is CVE-2026-7700?
CVE-2026-7700 is a security vulnerability in Langflow involving Prompt injection in Langflow Smart Transform can lead to code execution under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Langflow versions are affected?
Affected versions include releases prior to 1.10.3 across affected packages: langflow.
What version fixes CVE-2026-7700?
Upgrading to 1.10.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langflow affected?
Yes, langflow is affected in releases prior to 1.10.3. Upgrade your dependency to 1.10.3 or later.
What is the CVSS score of CVE-2026-7700?
CVE-2026-7700 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-7700?
CVE-2026-7700 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check PyPI dependencies for CVE-2026-7700?
Run the dependency tree command: 'pip show langflow'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9fpm-3445-2vx4",
  "modified" : "2026-10-05T22:30:41Z",
  "published" : "2026-10-05T22:30:41Z",
  "aliases" : [ "CVE-2026-7700" ],
  "summary" : "Langflow: Prompt injection in Langflow Smart Transform can lead to code execution",
  "details" : "## Summary\n\nLangflow versions 1.3.0 through 1.10.2 contain a code-injection vulnerability in the Smart Transform (`LambdaFilterComponent`) component.\n\nSmart 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.\n\nA 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.\n\n## Vulnerability details\n\n**Vulnerable Code Location**: `src/lfx/src/lfx/components/llm_operations/lambda_filter.py` (line 242 in v1.10.2)\n\n```python\ndef _validate_lambda(self, lambda_text: str) -> bool:\n    \"\"\"Validate the provided lambda function text.\"\"\"\n    return lambda_text.strip().startswith(\"lambda\") and \":\" in lambda_text\n\n# ...\nreturn eval(lambda_text)  # noqa: S307\n```\n\nFor example, an attacker can attempt to make the model return:\n\n`lambda x: __import__(\"os\").system(\"id\")`\n\nThis 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.\n\nSuccessful 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.\n\n## PoC\n\nhttps://github.com/user-attachments/assets/13c48fe1-7225-4e0d-9687-2d2df1e87f0e\n\n## Fix\n\nThe reported path was addressed by validating the generated code's AST and evaluating it with a restricted builtins mapping.\n\nThe 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.\n\n## Workarounds\n\nUntil an upgrade is possible:\n- Remove Smart Transform from runnable flows.\n- Restrict flow creation, editing, and execution to trusted users.\n- Do not route untrusted or externally controlled data through Smart Transform.\n- Limit the Langflow process's filesystem, network, and credential access.\n\n## Credit\n\n- **Peyton Kennedy ([p80n-sec](https://github.com/p80n-sec)) of Endor Labs** — reporter (original finder)\n- **[SZXSec](https://github.com/SZXSec)** — reporter (duplicate report)\n- **[cyjhhh](https://github.com/cyjhhh)** — reporter (duplicate report)\n- **[0gur1](https://github.com/0gur1)** — reporter (duplicate report)\n- **[ajm4n](https://github.com/ajm4n)** — reporter (duplicate report, Finding 1 of a multi-finding submission)\n- **[andifilhohub](https://github.com/andifilhohub)** — analyst\n- **Jordan Frazier ([jordanrfrazier](https://github.com/jordanrfrazier))** — remediation developer",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.10.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/security/advisories/GHSA-9fpm-3445-2vx4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-7700"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/pull/13530"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/commit/1641b28f33e2c47b9a0c6855922d44d1b8418b9d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/commit/94859df33acd70b2a1f816e26d68f5e89a7e5639"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/langflow-ai/langflow"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langflow-ai/langflow/releases/tag/v1.10.3"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/submit/804305"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/vuln/360869"
  }, {
    "type" : "WEB",
    "url" : "https://www.yuque.com/mengnanbulalei/ognlsk/hte2a98ro5gf8tp9?singleDoc#%20%E3%80%8AFirst%20release%20of%20Langflow%201.8.3%20Smart%20Transform%20eval()/Lambda%20injection%20RCE%20vulnerability%20analysis+POC%E3%80%8B"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-05T22:30:41Z",
    "nvd_published_at" : null
  }
}