Hoch

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

  • Veröffentlicht: 05.10.2026
  • Aktualisiert: 15.10.2026 18:17

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) 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

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) langflow >= 1.3.0, < 1.10.3 1.10.3

Verweise

CVSS-Wert 8.8/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Schwäche (CWE)
CWE-94
Plattform
Python (PyPI)
Paket
langflow
Veröffentlicht
05.10.2026
Aktualisiert
15.10.2026 18:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-4232 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-9fpm-3445-2vx4 - CC BY 4.0

Schwachstellenhistorie: langflow

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (42) im Archiv
Einträge insgesamt
42
Erste → letzte
06.2024 10.2026
Ohne Fix
7
In Angriffen ausgenutzt
5

Verteilung nach Schweregrad

  • Kritisch 15
  • Hoch 17
  • Mittel 7
  • Niedrig 3

Veröffentlichungen pro Jahr

  1. 2024: 4
  2. 2025: 5
  3. 2026: 33
Schweregrad:
  1. Kritisch · 9.1 CVE-2026-9205 < 1.10.1 1.10.1
  2. Kritisch · 9.8 CVE-2026-8505 >= 1.7.0, < 1.9.1 1.9.1
  3. Langflow: Prompt injection in Langflow Smart Transform can lead to code execution dieser Eintrag
    Hoch · 8.8 CVE-2026-7700 >= 1.3.0, < 1.10.3 1.10.3
  4. Kritisch · 9.6 CVE-2026-48519 < 1.9.2 1.9.2
  5. Kritisch · 9.6 CVE-2026-42048 < 1.9.0 1.9.0
  6. Hoch · 7.5 CVE-2026-33484 >= 1.0.0, < 1.9.0 1.9.0
  7. Kritisch · 9.9 CVE-2026-33309 >= 1.2.0, < 1.9.0 1.9.0
Mehr anzeigen (12) 20 von 32 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.