Skip to content

CVE-2026-101861: Langflow Component Input Schema Unsafe eval() Remote Code Execution

Density:
HERMES

HERMES THREAT SCORE & AGENTIC AI EXECUTION SURFACE

Target: Langflow Visual Agent Builder - schema.py / ComponentToolkit
Confidence: 98%
92 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 17 / 20
Weaponization 19 / 20
Exposure 18 / 20
Prevalence 18 / 20
Impact 19 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

Standard CVSS v3.1 rates this vulnerability at 9.8 (Critical, CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). The Hermes Threat Score assigns an operational score of 92 (CRITICAL), while the Agentic Security Score (HASS) elevates it to 94 (CRITICAL). In modern generative AI stacks, Langflow functions as the core orchestrator and execution plane for multi-agent workflows, autonomous coding loops, and RAG pipelines. When an untrusted component schema is saved via the API or shared across team workspaces, the unsafe eval() sink executes inside the host container process with unconstrained access to LLM API keys (OpenAI, Anthropic), vector embeddings, database connection strings, and connected agent tools.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-101861: Langflow Component Input Schema Unsafe eval() Remote Code ExecutionVULNERABILITY

Connected Nodes: 4
Active Relationships (Outgoing)
→ affectsPRODUCTLangflow AI Workflow Orchestrator
98% VERY_HIGH

Visual framework and multi-agent development environment for building, evaluating, and deploying conversational AI pipelines.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in Langflow Visual AI Builder documented in Hermes dossier.”

Supporting Verified Evidence:
→ exploitsAGENTIC ATTACK_PATTERNAAP-004: Semantic Tool Poisoning
92% VERY_HIGH

Attacker registers rogue MCP tools or skills with weaponized docstrings and deceptive metadata that trick the model into routing sensitive user tasks to attacker-controlled functions.

๐Ÿ” Why is this related? (Evidence & Provenance)

“CVE-2026-101861 weaponizes the agentic attack pattern formalized under AAP-004.”

Supporting Verified Evidence:
→ exploitsAGENTIC ATTACK_PATTERNAAP-003: Tool Parameter Tampering & Built-in Bypass
92% VERY_HIGH

Adversarial subversion of structured tool execution arguments (SQL, Shell, Filepath) passed from an LLM agent to host OS tools or MCP endpoints.

๐Ÿ” Why is this related? (Evidence & Provenance)

“CVE-2026-101861 weaponizes the agentic attack pattern formalized under AAP-003.”

Supporting Verified Evidence:
Inbound Associations (Incoming)
CHAIN-2026-LANGFLOW-AGENTEXPLOIT CHAIN → uses → [This Entity]
96% VERY_HIGH

Langflow is an open-source visual framework for developing multi-agent AI systems, LangChain architectures, and Model Context Protocol (MCP) integrations.

ParameterTechnical SpecificationOperational Impact
CVE IdentifierCVE-2026-101861Global vulnerability tracking reference
Advisory SourceVulnCheck Exploit Intelligence / NVDWeaponized exploit research
Vulnerability ClassImproper Neutralization of Directives in Dynamically Evaluated Code (CWE-95)Arbitrary Python code execution
Vulnerable Filesrc/backend/base/langflow/schema.pyComponent schema & LangChain tool generator
Vulnerable FunctionComponentToolkit.get_tools() / schema generatorDynamic typing evaluation via eval()
Affected Releases1.0.16 <= v < 1.12.0, 0.0.94 <= v < 1.0.0Containerized & pip-installed Langflow instances
Fixed Release1.12.0Safe Literal parsing without eval()
Agentic Severity (HASS)94 / 100 (CRITICAL)Direct compromise of agent toolchains & API secrets

In Langflow, visual nodes represent LLMs, prompts, tools, and custom Python components. To expose custom components to LangChain agents, Langflow generates dynamic Pydantic models where component input options are validated against a generated typing constraint:

USER / API CLIENT (POST /api/v1/custom_component)
โ”‚
โ”‚ Component Schema with Custom 'options'
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ FastAPI Endpoint (Custom Component)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Raw JSON Input Schema
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ComponentToolkit.get_tools() โ”‚
โ”‚ in langflow/schema.py โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Interpolation: f"Literal[{options}]"
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Unsafe eval() Execution Sink โ”‚ <--- [CVE-2026-101861 Vulnerability]
โ”‚ eval(literal_str) โ”‚ Arbitrary Python code executed
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Host Process Shellcode
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Host Operating System Takeover โ”‚
โ”‚ Steal API Keys, Pivot via Agent โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The vulnerability stems from the implementation of Literal type generation for dropdown inputs in langflow/schema.py. The function attempts to dynamically construct a typing Literal containing all allowed choices:

# Vulnerable code pattern in langflow/schema.py (versions < 1.12.0)
def build_field_type(field_name, field_config):
options = field_config.get("options", [])
if options:
# VULNERABILITY: Formats options representations directly into an eval() string
# If options contains objects whose __repr__() yields arbitrary code,
# or if options string contains injected python syntax, eval() executes it.
options_repr = ", ".join(repr(opt) for opt in options)
literal_type_str = f"Literal[{options_repr}]"
# SINK: Direct evaluation without an AST whitelist or restricted globals
return eval(literal_type_str, {"Literal": Literal})
return str

When an attacker crafts a component definition containing a serialized option payload such as:

__import__('os').system('id > /tmp/pwned')

or injects an object where repr(opt) returns an expression containing __class__.__base__.__subclasses__(), the call to eval() evaluates the string in the context of the running Python process. Because the globals dictionary only specifies {"Literal": Literal}, Pythonโ€™s built-in name resolution resolves standard builtins (__builtins__), granting immediate execution access to __import__, eval, exec, and standard library modules.


sequenceDiagram
autonumber
participant Attacker as Authenticated Actor / Malicious Contributor
participant API as Langflow API (/api/v1/custom_component)
participant Engine as Langflow Schema Compiler (schema.py)
participant Host as Python Runtime Host
Attacker->>API: Authenticate with low-privilege user token
Attacker->>API: POST /api/v1/custom_component with weaponized options array
API->>Engine: Invoke ComponentToolkit.get_tools() to validate schema
Engine->>Engine: Interpolate options into f"Literal[{options}]"
Engine->>Host: Execute eval(literal_type_str)
Host->>Host: Run __import__('subprocess').Popen(...)
Host-->>Attacker: Open reverse TCP connection / exfiltrate .env secrets
  1. Workspace Access: The adversary acquires valid access to a shared Langflow project or registers an account on an open/multi-tenant instance.
  2. Component Submission: The attacker submits a new custom component definition via POST /api/v1/custom_component or imports a poisoned workflow JSON template.
  3. Triggering the Sink: Langflow processes the component to register its input fields as LangChain tools, passing the field options into build_field_type in schema.py.
  4. Arbitrary Code Execution: The eval() statement executes the injected expression, spawning a background process that exfiltrates environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, DATABASE_URL) to an external command-and-control server.

title: Langflow Suspicious Child Process Spawn via Python eval
id: d4b1a820-912f-4c55-b789-101861000001
status: experimental
description: Detects unusual child shell processes or command interpreters spawned by the Langflow backend process.
references:
- https://vulncheck.com/advisories/langflow-code-execution-via-eval-in-component-input-schema
- https://github.com/langflow-ai/langflow
author: Hermes Codex Cyber Intelligence
date: 2026-09-29
logsource:
product: linux
category: process_creation
detection:
selection_parent:
ParentCommandLine|contains:
- "langflow"
- "uvicorn langflow"
selection_children:
Image|endswith:
- "/bin/sh"
- "/bin/bash"
- "/usr/bin/curl"
- "/usr/bin/wget"
- "/bin/nc"
condition: selection_parent and selection_children
falsepositives:
- Legitimate custom Python components intentionally invoking command-line utilities in sandboxed dev setups
level: critical
tags:
- attack.execution
- attack.t1059.006
- attack.defense_evasion

  1. Upgrade Langflow to Version 1.12.0 or Later:
    Update the deployment container image or pip package immediately:

    Terminal window
    pip install --upgrade "langflow>=1.12.0"

    Langflow 1.12.0 replaces dynamic string evaluation with safe AST inspection and static typing validation.

  2. Restrict Custom Component Creation:
    Disable untrusted custom component creation in production multi-user environments by configuring environment variables in langflow.env:

    Terminal window
    LANGFLOW_AUTO_SAVING=false
    LANGFLOW_STORE=false
  3. Rotate Compromised API Secrets:
    If inspection reveals unauthorized process spawns or unexpected flow definitions:

    • Immediately rotate all LLM API tokens (OpenAI, Anthropic, Cohere, HuggingFace).
    • Revoke and regenerate database credentials and vector store API keys (Pinecone, Qdrant, Chroma).
    • Re-deploy the Langflow container with isolated network policies preventing egress to non-essential IP ranges.