/

CVE-2026-105697

Severity:

CRITICAL RISK

(9.9)

OS Command Injection (CWE-78) in Langflow MCP Server

CVE-2026-105697

Undergoing Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection vulnerability in Langflow's MCP stdio transport allows attacker-controlled server configurations to launch arbitrary operating system commands on the Langflow host. The risk is especially severe on exposed instances with automatic login enabled, while authenticated non-administrative users may also be able to trigger command execution when that setting is disabled.

A command injection vulnerability in Langflow's MCP stdio transport allows attacker-controlled server configurations to launch arbitrary operating system commands on the Langflow host. The risk is especially severe on exposed instances with automatic login enabled, while authenticated non-administrative users may also be able to trigger command execution when that setting is disabled.

Affected context

The vulnerability occurs in Langflow deployments that use the MCP server configuration or MCP Tools component with the stdio transport. It becomes risky when a user can create or modify MCP server settings, or otherwise cause Langflow to connect to a configured server, and the deployment permits arbitrary command values to reach the host process launcher.

The vulnerability occurs in Langflow deployments that use the MCP server configuration or MCP Tools component with the stdio transport. It becomes risky when a user can create or modify MCP server settings, or otherwise cause Langflow to connect to a configured server, and the deployment permits arbitrary command values to reach the host process launcher.

Exploit preconditions

  • Attack surface: Langflow MCP server settings, MCP API endpoints, and flows using the MCP Tools component
  • Required access: Unauthenticated access may be sufficient when automatic login is enabled; otherwise, an authenticated user with relevant configuration or flow access may be sufficient
  • Trigger point: Langflow attempts to connect to, list, load tools from, or run a flow involving an MCP stdio server
  • Why exploitation is possible: User-controlled command and argument values are passed to an operating system shell or process launcher without an effective allowlist or equivalent restriction
  • Attack surface: Langflow MCP server settings, MCP API endpoints, and flows using the MCP Tools component
  • Required access: Unauthenticated access may be sufficient when automatic login is enabled; otherwise, an authenticated user with relevant configuration or flow access may be sufficient
  • Trigger point: Langflow attempts to connect to, list, load tools from, or run a flow involving an MCP stdio server
  • Why exploitation is possible: User-controlled command and argument values are passed to an operating system shell or process launcher without an effective allowlist or equivalent restriction

Why this happens

The issue is an OS command injection flaw mapped to CWE-78. Langflow treated MCP server command configuration as executable process input and, in affected behavior, routed it through shell command construction without constraining the executable to approved programs. This creates a direct path from configuration data to operating system command execution instead of maintaining a strict separation between data and process invocation.

The issue is an OS command injection flaw mapped to CWE-78. Langflow treated MCP server command configuration as executable process input and, in affected behavior, routed it through shell command construction without constraining the executable to approved programs. This creates a direct path from configuration data to operating system command execution instead of maintaining a strict separation between data and process invocation.

Potential impact

  • Arbitrary commands may execute with the privileges of the Langflow process
  • The Langflow host or container could be compromised
  • Application data, credentials, and workflow definitions could be exposed or altered
  • An attacker could establish persistence or use the host for lateral movement
  • Integrity of AI agents, tools, and downstream workflows could be undermined
  • Service availability could be disrupted
  • Arbitrary commands may execute with the privileges of the Langflow process
  • The Langflow host or container could be compromised
  • Application data, credentials, and workflow definitions could be exposed or altered
  • An attacker could establish persistence or use the host for lateral movement
  • Integrity of AI agents, tools, and downstream workflows could be undermined
  • Service availability could be disrupted

General mitigation guidance

Mitigation generally focuses on preventing user-controlled values from becoming arbitrary operating system commands.

Common defensive patterns include:

  • Use a strict allowlist of approved MCP executables and validated argument formats
  • Invoke processes directly with structured argument arrays rather than shell command strings
  • Avoid shell interpretation and shell wrappers for configurable process launches
  • Restrict MCP server creation and modification to trusted administrative workflows
  • Disable development-only automatic authentication in production environments
  • Run Langflow with a dedicated, least-privileged operating-system identity
  • Isolate worker processes and limit filesystem, network, and secret access
  • Apply server-side authorization and validation consistently across UI, API, and flow execution paths

Mitigation generally focuses on preventing user-controlled values from becoming arbitrary operating system commands.

Common defensive patterns include:

  • Use a strict allowlist of approved MCP executables and validated argument formats
  • Invoke processes directly with structured argument arrays rather than shell command strings
  • Avoid shell interpretation and shell wrappers for configurable process launches
  • Restrict MCP server creation and modification to trusted administrative workflows
  • Disable development-only automatic authentication in production environments
  • Run Langflow with a dedicated, least-privileged operating-system identity
  • Isolate worker processes and limit filesystem, network, and secret access
  • Apply server-side authorization and validation consistently across UI, API, and flow execution paths

How teams detect issues like this

Detection can combine source review, runtime monitoring, and policy enforcement:

  • Use static analysis to identify shell invocation APIs, command interpolation, and process launchers receiving configuration-derived values
  • Review MCP transport code for missing executable allowlists and inconsistent validation between UI and API paths
  • Monitor process creation from the Langflow service for unexpected binaries, shell interpreters, or unusual child-process activity
  • Audit MCP configuration changes and correlate them with process starts and flow execution
  • Enforce policies that prevent production services from enabling unauthenticated or development-only access modes
  • Use automated code review and dependency security tooling to flag command construction and unsafe process execution patterns

Detection can combine source review, runtime monitoring, and policy enforcement:

  • Use static analysis to identify shell invocation APIs, command interpolation, and process launchers receiving configuration-derived values
  • Review MCP transport code for missing executable allowlists and inconsistent validation between UI and API paths
  • Monitor process creation from the Langflow service for unexpected binaries, shell interpreters, or unusual child-process activity
  • Audit MCP configuration changes and correlate them with process starts and flow execution
  • Enforce policies that prevent production services from enabling unauthenticated or development-only access modes
  • Use automated code review and dependency security tooling to flag command construction and unsafe process execution patterns

Sources

SourceLink
github.comgithub.com/langflow-ai/langflow/commit/eba285edf1dd4a33bf23a9cb8113c991fcdf3d1d
github.comgithub.com/langflow-ai/langflow/commit/efbc4a16e639409d938a4883463d27ef0bc637a0
github.comgithub.com/langflow-ai/langflow/pull/12290
github.comgithub.com/langflow-ai/langflow/pull/14036
github.comgithub.com/langflow-ai/langflow/releases/tag/v1.10.3
github.comgithub.com/langflow-ai/langflow/security/advisories/GHSA-7w94-79vh-5mr2
github.comgithub.com/langflow-ai/langflow/security/advisories/GHSA-w794-rj3p-xv45
ox.securityox.security/blog/mcp-supply-chain-advisory-rce-vulnerabilities-across-the-ai-ecosystem
ox.securityox.security/blog/the-mother-of-all-ai-supply-chains-critical-systemic-vulnerability-at-the-core-of-the-mcp

Frequently asked

questions

Yes. An attacker who can reach the relevant Langflow interface and satisfy its access requirements may cause commands to run on the Langflow host. On exposed deployments with automatic login enabled, an account may not be required.

It depends on deployment configuration. Automatic login can broaden access to unauthenticated users, while deployments with that feature disabled may still be exposed to authenticated users who can manage MCP servers or execute affected flows.

Do not pass user-controlled command values to a shell. Enforce a server-side allowlist, validate arguments against a strict schema, and launch only approved executables using structured process APIs.

Treat process-launch configuration as privileged input, apply authorization at every API and workflow path, disable development authentication settings in production, and monitor unexpected child processes created by application services.

Yes. An attacker who can reach the relevant Langflow interface and satisfy its access requirements may cause commands to run on the Langflow host. On exposed deployments with automatic login enabled, an account may not be required.

It depends on deployment configuration. Automatic login can broaden access to unauthenticated users, while deployments with that feature disabled may still be exposed to authenticated users who can manage MCP servers or execute affected flows.

Do not pass user-controlled command values to a shell. Enforce a server-side allowlist, validate arguments against a strict schema, and launch only approved executables using structured process APIs.

Treat process-launch configuration as privileged input, apply authorization at every API and workflow path, disable development authentication settings in production, and monitor unexpected child processes created by application services.

Find out what's already
exploitable in your codebase.