UTC
Low

Langflow 1.0.16 - 1.11.6: unsafe eval() on Tool-Mode input options in schema.py

GHSA-33p4-w7j3-33mw · published 2026-09-28

Severity
Low
CVSS score
2.1
Chance of exploitation (EPSS)
No CVE
Fixed in
1.12.0
What it is

From Langflow 1.0.16 through 1.11.6, create_input_schema() and create_input_schema_from_dict() in schema.py built a typing.Literal type for inputs with an options list (for example DropdownInput) by interpolating the list into a string and passing it to eval(): The sink runs whenever a component is converted into a LangChain tool (ComponentToolkit.get_tools()), for example when a custom component with tool_mode=True is saved through Check & Save (POST /api/v1/custom_component), or when a Tool-Mode component or flow-as-tool is built. This was fixed in Langflow 1.12.0 by #14502, which replaces eval() with Literal[tuple(options)].

What to do

Upgrade langflow to 1.12.0 or later, and langflow-base to 1.12.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

Fixed in Langflow 1.12.0 by #14502 ("fix(security): replace eval() with safe Literal construction in schema.py", merge commit ab5d776fbb9bd425228873b42e5b6a0dccfbc253). Regression tests were added in . Upgrade to langflow >= 1.12.0 (or langflow-base >= 1.12.0 / lfx >= 1.12.0). Independently of this issue, only grant custom-component and code-editing rights to trusted users, and set LANGFLOW_ALLOW_CUSTOM_COMPONENTS=false on deployments where users must not run arbitrary Python.

Affected
PackageRegistryAffectedFixed in
langflowPyPI>= 1.0.16, < 1.12.01.12.0
langflow-basePyPI>= 0.0.94, < 1.12.01.12.0

The impact, patch and workaround text comes from the advisory, shortened (published by Langflow). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].