PYSEC-2026-4241: Langflow: OS command injection (RCE) via arbitrary command in MCP stdio server configuration

Published Oct 5, 2026
·
Updated

Langflow is a tool for building and deploying AI-powered agents and workflows. Before Langflow 1.10.3, the MCP stdio transport launched whatever command / args a user put in an MCP server configuration, with no allowlist and (before 1.10.3) wrapped in bash -c "exec {command} ...". Any user able to reach the MCP server settings ("Settings → MCP Servers → Add MCP Server", POST/PATCH /api/v2/mcp/servers/{servername}) or to build a flow with the MCP Tools component could add a "server" whose command is an arbitrary OS command (touch, rm -rf, a reverse shell, ...). The command runs on the Langflow host as the Langflow process user as soon as Langflow tries to connect to the server (listing servers, loading tools, running the flow) — even when the UI then reports that the stdio server failed to start. With the default LANGFLOWAUTOLOGIN=true, GET /api/v1/autologin hands out a token without credentials, so on an exposed instance running the default configuration this is reachable without an account. AUTOLOGIN is documented as a development-only setting; with it disabled, any authenticated (non-admin) user can exploit it. This issue is fixed in Langflow 1.10.3, langflow-base 0.10.3, and lfx 1.10.3.

Affected Software

3 affected components
pypi/langflow<1.10.3
pypi/langflow-base<0.10.3
pypi/lfx<1.10.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Langflow to a version that resolves this vulnerability.

    Fixed in 1.10.3
  2. Upgrade

    Upgrade langflow-base to a version that resolves this vulnerability.

    Fixed in 0.10.3
  3. Upgrade

    Upgrade lfx to a version that resolves this vulnerability.

    Fixed in 1.10.3
  4. Configuration

    Disable LANGFLOW_AUTO_LOGIN, which is documented as a development-only setting.

    Langflow LANGFLOW_AUTO_LOGIN = false

Event History

Oct 5, 2026
CVE Published
via OSV·08:16 PM
Data Sourced
via OSV·08:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this in a typical deployment?

On an exposed instance with the default LANGFLOW_AUTO_LOGIN=true setting, no account is required because the auto-login endpoint issues a token without credentials. If auto-login is disabled, any authenticated non-admin user with access to MCP server settings or the ability to build a flow using the MCP Tools component can exploit it.

2

When does the injected command execute, and under which account?

The command runs on the Langflow host as the user running the Langflow process when Langflow attempts to connect to the configured MCP server. This can occur while listing servers, loading tools, or running a flow, including when the UI subsequently reports that the stdio server failed to start.

3

Are default configurations affected?

Yes, an exposed instance using the default LANGFLOW_AUTO_LOGIN=true configuration is reachable without an account. Auto-login is documented as a development-only setting.

4

What can be done if upgrading is not immediately possible?

Disable LANGFLOW_AUTO_LOGIN and restrict access to trusted authenticated users, particularly users who can manage MCP servers or create flows with the MCP Tools component. Prevent untrusted users from supplying MCP stdio server commands or arguments.

5

Which releases contain the fix?

The issue is fixed in Langflow 1.10.3 and langflow-base 0.10.3. The provided information does not identify a fixed version for lfx.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203